Visual Studio 2013 can't debug javascript in cshtml Visual Studio 2013 can't debug javascript in cshtml javascript javascript

Visual Studio 2013 can't debug javascript in cshtml


So, apparently this is a "known issue" that will be fixed as soon as possible. A temporary work around that works for "some" people is making sure any Javascript is in a separate file.

It is caused by having RAZR and Javascript in the same file and Visual Studio 2013 not being able to handle debugging in that instance.


I don't know what your particular problem is, but if you want to force a debug breakpoint to always happen, add debugger; to the line that you want it to stop on, and it will stop. This is regardless of where the JS is located (in a .js file, .html, cshtml, etc.)

Here is a blog post about it:

http://sumitmaitra.wordpress.com/2013/12/11/quickbytes-visual-studio-2013-and-javascript-debugging/

I also agree that JS should go in a .js file (which I've never had a problem adding a break point in a .js file), but for quick prototyping, this is a solution you can use.

If that still doesn't work, you can always you the F12 tools


The only browser that allows debugging a javascript file from Visual Studio is Internet Explorer. (this is what I found out after testing my application on different browsers)