Does any one know how to enable in page JavaScript script tag debugging?
In vs2012 i can go to the page in visual studio which is running in the debugger and create a break point however in vs2013 i get "A breakpoint could not be inserted at this location"?
Thanks
JavaScript inside a Razor view (a cshtml file) cannot be debugged from Visual Studio. To debug your JavaScript, move it to a separate . js file and link to that file from your Razor view. This way, breakpoints set in the JavaScript will be hit and you can debug from Visual Studio.
In the toolbar, click the button to get the dropdown of browsers to debug with and then click "Browse with...". Click "Add...", set Program to wherever Chrome is on your machine and set Arguments to --remote-debugging-port=9222 . You can also set Incognito as I have to ignore cache but it is not required. Important!
try to keep your scripts in separate files and put the breakpoints in that files. I had the same problem but when I moved java scripts from my views to script files I was able to debug. It may not be a solution but at least you should be able to work.
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