JavaScript debugging issue with vs2005

debuggingjavascriptvisual-studio-2005

I encountered a strange problem today. Whenever i put a breakpoint in one of my js files, the breakpoint is not hit.

I use Visual Studio 2005 in combination with TFS.
In ie the disable script options are both disabled.

The only thing that changed is that I installed Visual Basic 6 for an old project, but I don't see how that would impact debugging via Visual Studio 2005.

Did anyone had this problem before, or better does anyone know a solution?
thx.

Best Answer

In order for Javascript debugging to work the Visual Studio needs to be attached as a debugger to the IE process and it needs to be able to resolve the phyiscal path of the javascript file with the URL of the same script loaded in IE.

Have you checked that when you start debugging in VS that it actually attaches to the IE process that gets spun up?

Customizer your toolbar, on the commands tab select the debug category then find the "Script Explorer" command, drag it to a tool bar. Close the dialog.

Using script explorer you should be able to find the script that ought to have the break point on. Ordinarily VS is able to combine the root path it specifies for the developer web server with the physical JS file path in order to determine what its URL would look like from the browsers perspective, it can then novate the break point from the physical file to the script loaded in the browser.