Search code examples
javascriptvisual-studiodebuggingvisual-studio-2015visual-web-developer

debugging javascript in Visual Studio Web Express 2013 or Visual Studio 2015 Community


In earlier versions of VS it was possible to use VS javascript debugger (which is awesome) to debug any website. The "trick" was to create an empty web project, open IE within the instance of VS. You could then just go to whatever page you wanted to debug and have full capacity of the debugger -- really handy when debugging more complicated apps. I know this worked as recently as VS Web Developer Express 2008, but I am not able to get it working under either Web Express 2013 or VS 2015 Community. I can't imagine they would remove this functionality, so I'm thinking I'm just doing it wrong. For context, this link describes how it worked in older versions:

http://blog.berniesumption.com/software/how-to-debug-javascript-in-internet-explorer/

https://www.sitepoint.com/community/t/ie-javascript-debugging-with-visual-studio-express-a-visual-guide/3768 (unfortunately images are missing from this one)


Solution

  • I could debug it in my side using the VS2015 with the "debugger" keyword in the JavaScript code.

    Of course, please not enable the option "Disable Script debugging" in your IE setting.

    enter image description here

    enter image description here

    enter image description here