Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"No symbols loaded for the current document" while debugging JavaScript in Visual Studio

Tags:

I'm working on a .NET 3.5 website, with three projects under one solution. I'm using jQuery in this project. I'd like to use the Visual Studio JavaScript debugger to step through my JavaScript code. If I set a breakpoint in any of the .js files I get a warning that says:

The breakpoint will not currently be hit. No symbols have been loaded for this document.

How do I fix this? I'm guessing that Visual Studio is having some trouble parsing through some of the jQuery code. I will try to replace the minimized version of jQuery.js with the expanded version, but I don't think that will fix it.

like image 236
Randy L Avatar asked Sep 22 '08 15:09

Randy L


1 Answers

I was experiencing the same behavior in Visual Studio 2008, and after spending several minutes trying to get the symbols to load I ended up using a workaround - adding a line with the "debugger;" command in my JavaScript file.

After adding debugger; when you then reload the script in Internet Explorer it'll let you bring up a new instance of the script debugger, and it'll stop on your debugger command let you debug from there.

In this scenario I was already debugging the JavaScript in Firebug, but I wanted to debug against Internet Explorer as well.

like image 174
Ian Robinson Avatar answered Dec 28 '22 02:12

Ian Robinson