The Challenges of Script Debugging Using VS2008
I recently worked on a problem that required me to debug the script for the HTML Editor control ion WSS. In the past I have always used the Microsoft Script Debugger and just selected "Break on next statement". In this case that was not really getting me where I needed to be so I decided to try to do it with VS2008.
I then edited my .js file in the \Layouts\1033 folder and added the line "debugger;" at the beginning of the function I wanted to work on. I then cleared the IE temporary internet files folder so I would easily get the new version of the .js file. I went through the steps to reproduce the problem and it opened Windows Script Debugger. This was not what I wanted. I wanted Visual Studio 2008 so I could use all the fancy features like hovering over variables and such.
I speculated that the problem might be that when I installed the script debugger it stole the JIT settings from VS2008 so I uninstalled it and tried again. No joy. OK, it may have stolen them and not put them back when it was removed.
It occurred to me that it may be that VS2008 is just not configured for JIT debugging of scripts. I checked my VS2008 debugging setting in the UI and found that I didn't have the Script setting enabled so I turned off the other two and enabled it:
A quick test verified that this did not fix my problem.
Here is the proper settings for this to work on an x86 machine:
"Debugger"="\"D:\\WINDOWS\\system32\\vsjitdebugger.exe\" -p %ld -e %ld"
In my case these settings needed to be transposed to the x64 registry location:
Other than the location, the setting are the same.