7

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

4
  • What Browser you using? I can debug using IE - (v10) Commented Nov 1, 2013 at 7:27
  • @Jonathan D - did this ever find a resolution? I'm a metoo! Commented Dec 17, 2013 at 16:11
  • 1
    no I haven't sorry only thing you can do is move the JavaScript to an external file. Commented Dec 18, 2013 at 11:50
  • For me, the breakpoints in <script> blocks was working, then stopped. I'm guessing there's a bug... Commented May 13, 2015 at 18:06

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

yeah this is basicly what i ended up doing, i found if you do need to debug an inline put "debugger;" in the JavaScript and you can do it that way but its a bit of a pain.
I don't understand why MS change it this way it's co inconvenient some times. What I'm doing also is debugging with browser development tools, still not perfect but better this than nothing
0

There was a known issue in Visual Studio 2013 that caused breakpoints to not work correctly inside script blocks. A fix was made and is included in the recently released Visual Studio 2013 Update 2 RC, which you can install from http://www.microsoft.com/en-us/download/details.aspx?id=42307.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.