How can I breakpoint in js?

May 16, 2008 at 3:01 PM
I'm really puzzled. I can't seem to successfully set a breakpoint in any of the dropthings javascript. I just get the "breakpoint will not be hit" error. I'm guessing VS2008 does not properly recognise the javascript files as files that will be loaded at runtime.

Has anyone got this to work?

Martyn
May 16, 2008 at 10:31 PM
For Internet Explorer, I had to go to Tools/Options and enable script debugging. Then in VS2008, tools/attach to process and attach to the IE process that's running the dropthings site.
I haven't figured out yet how to do it in firefox.

May 16, 2008 at 11:45 PM
This article has a firefox solution, although I haven't tried it.
http://weblogs.asp.net/rchartier/archive/2005/10/06/426799.aspx
May 17, 2008 at 4:27 AM
This article has a firefox solution, although I haven't tried it.
http://weblogs.asp.net/rchartier/archive/2005/10/06/426799.aspx
May 19, 2008 at 12:12 PM
Thanks for the input merlin, my problem wasn't turning debugging on though, it was being able to hit breakpoints.

I did find the solution for my problem though. The ScriptDeferFilter removes scripts and bundles them up, thus removing the ability to hit any breakpoint you set in VS. Setting this.captureScripts = false in ScriptDeferFilter.cs sorts this out. Obviously this can be restored to true at release time.

Martyn

merlinr wrote:
This article has a firefox solution, although I haven't tried it.
http://weblogs.asp.net/rchartier/archive/2005/10/06/426799.aspx