I am using Visual Studio 2010 and IE 9. I am trying to debug javascript .js files in my Solution. I put the break point in the files and can't do it no matter what. I have tried doing things like unchecking options in IE like disable script debugging. And I can't do it no matter what.
Am I missing anything ?? I was able to debug javascript files yesterday and I am not able to do it today.
I pressed F12 AND Hit start debugger in developer tools of IE 9 and it gave me the message:
'Unable to attach to process. Another debugger might be attached to the process'
Any ideas and suggestions on what could be wrong.
Right click to 'Inspect Element', or click on F12 Developer Tools from the gear icon to open the Developer Tools pane. Click on the "Debugger" tab. Click on the Stop sign icon.
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.
Javascript provides the keyword Debugger to debug the code. When we add the debugger keyword in between our code, so after executing the code, a debugger panel will show up where we can make breakpoints and play/pause to check the value and understand according to it.
When you hit F5 and Debug in Visual Studio it sometimes either doesn't attach the debugger to IE9 correctly, or normally in my case it just refreshes the app pool on a local running instance of Cassini (your Visual Studio Dev WebServer), which often if its already running will not let the VS Debugger attach correctly.
If you click in your system tray, find the icon for Cassini (ASP.NET Developement Server) - just right click and hit stop. Then go back to Visual Studio and F5 again, and the debugger should attach again ok.
My favorite thing to do is actually CTRL+F5 and run the web app without debugging so I can use the built in (F12) debugger in IE9. By doing that, you will not get the "Unable to attach to process..." message, and you will also be able to tell whether your Javascript edits are actually being refreshed or cached in your browser while you are developing.
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