Reputation: 4905
Sometimes I can set breakpoints in my javascript, sometimes I can't - why is this? I can't seem to find whatever it is that would determine whether I can debug it or not. I know I can debug the dynamic page, but occasionally I'll be able to set breakpoints in my original code.
Upvotes: 0
Views: 2437
Reputation: 11
Try this:
--javascript code......
debugger; // stops execution and can start debugging
--javascript code......
Upvotes: 1
Reputation: 9680
You can use following to debug javaScript
breakpoint
inside javascript. Using VS2010 you can debug the javascript. You will need to enable javascript debugging in IE by unchecking both of the Disable script debugging
from IE => Options => Advanced.console.log
to log the messages from javaScriptHope this info helps you.
Upvotes: 3