I'm trying to debug javascript code just by adding a breakpoint in VS2008, but the debugger's not stopping. Do I have to do some special setup in order to enable javascript debugging? Or does the code have to be in a separate js file?
On the development computer, open the Visual Studio project to debug and in its Properties, go in Debugging and select Remote Windows Debugger as the Debugger to launch, put something similar to C:\Share\$(ProjectName).exe in Remote Command, C:\Share in Working Directory, the server name indicated on the Visual Studio ...
But fortunately, all modern browsers have a built-in JavaScript debugger. Built-in debuggers can be turned on and off, forcing errors to be reported to the user. With a debugger, you can also set breakpoints (places where code execution can be stopped), and examine variables while the code is executing.
We can open the console by pressing the F12 key or by clicking the right button and then selecting inspect. Javascript provides the keyword Debugger to debug the code.
Did you uncheck the checkboxes in the settings
Tools-->Internet Options-->Advanced-->Browsing [heading]-->Uncheck "Disable Script Debugging (Internet Explorer)" and Uncheck "Disable Script Debugging (Other)"
Sometimes you need to restart the browser to get VS2008 to recognize that it has made some changes.
Have you tried to stick the "debugger;" keyword into your JavaScript file? This usually never fails me.
If you have IE8, you can debug right in the browser itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With