简体   繁体   中英

Debug Javascript in Visual Studio 2013 with Just My Code

I enabled Just My Code in Visual Studio 2013 but I cannot hit a breakpoint in my javascript code let alone not stepping into an external javascript library eg jQuery. I can hit using debugger keyword and unchecking disabling script debugging from Internet Explorer though. I think MS has introduced such a great feature but it is useless if I cannot use it with ASP.NET.
Someone please suggest anything.

You need to read the documentation in this URL. It tells you all about how VS determines if the code is your code or not, and how to tell VS what is your code and not. Be sure to skip down to the JS section.

http://msdn.microsoft.com/en-us/library/dn457346.aspx#BKMK_JavaScript_Just_My_Code

You can use Firefox and use Firebug plugin to debug your javascript.

Also check Just My Code for JavaScript Windows Store Apps in Visual Studio 2013

The inconsistency of JS breaking in VS is a pain. If I am in a hurry I simply insert an errorable statement (eg., sdfasdf;) at the spot in the JS where I want to look at the variables. This causes an alert window to pop up. Click the 'Break' button and you will be at the line that caused the error. At that point all of your variables will be visible. You can then drag the yellow current line indicator to a line of your choosing and continue processing from there. This has worked for me since VS 2005.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM