Visual Studio integrated Javascript debugging with Windows 10 Edge

安稳与你 提交于 2019-11-30 00:26:11

TLDR;

Once it is running in Edge, use Debug > Attach to Process from Visual Studio Community 2015.

  • Attach to: Script code
  • Available Processes: MicrosoftEdgeCP.exe

Steps

  1. Optional: Set Edge as your default browser.
  2. Open your project in Visual Studio.
  3. Add breakpoints in your JavaScript.
  4. In the Solution Explorer, select your project
  5. Use Ctrl + Shift + W to "View in browser."
  6. If you did step 1, it will open in Edge. Otherwise, copy the URL into Edge.
  7. Once it is running in Edge, in Visual Studio, go to Debug > Attach to Process.
  8. In the "Attach to" area, select "Script code".
  9. From the "Available Processes" choose "MicrosoftEdgeCP.exe".
  10. Click attach and refresh the page in Edge.
  11. You will now be debugging from the Visual Studio IDE.

Set Default Browser

Attach Visual Studio to Edge Script

Debugging

The above works in Visual Studio Community 2015 and it might also work in previous versions. Hooray!

Valuator

This feature has finally been added in Visual Studio 2017 15.7.

JavaScript debugging with Microsoft Edge

The Windows 10 April 2018 Update is also needed, as it contains the Microsoft Edge DevTools Protocol

Using: Microsoft EdgeHTML 18.17763 , MS Visual Studio 15.9.5

All I had to do was this: In VS...click Debug -> Options. Under Debugging-General...check Enable JavaScript debugging for ASP.NET (Chrome, Edge and IE) The next time you launch Edge from VS you will see the blue Developer Tools Server icon next to the address bar.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!