How to debug (only) JavaScript in Visual Studio?

后端 未结 5 583
梦如初夏
梦如初夏 2020-12-05 02:01

I\'m developing a webapplication (asp.net mvc 4) with Microsoft Visual Studio 2012, and as the solution is getting bigger, the debug is getting slower.

Need to know

5条回答
  •  星月不相逢
    2020-12-05 02:30

    For debugging JavaScript code in VS2015, there is no need for

    1. Enabling script debugging in IE Options -> Advanced tab
    2. Writing debugger statement in JavaScript code

    Attaching IE didn't work, but here is a workaround.

    Select IE

    and press F5. This will attach both worker process and IE as shown here-

    If you are not interested in debugging server code, detach it from Processes window.

    You will still face the slowness when you press F5 and all your server code compiles and loads up in VS. Note that you can detach and attach again the IE instance launched from VS. JavaScript breakpoints are hit the same way they are in server side code.

提交回复
热议问题