Visual Studio集成JavaScript调试与Windows 10 Edge [英] Visual Studio integrated Javascript debugging with Windows 10 Edge

查看:754
本文介绍了Visual Studio集成JavaScript调试与Windows 10 Edge的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使Visual Studio集成JavaScript调试器与Windows 10 Edge?我的意思是从Visual Studio IDE内部遍历代码,设置断点等功能。我使用Visual Studio 2012和2013,也许这可以在2015年实现?

解决方案

TLDR;



一旦在Edge中运行,使用Debug>附加到Visual Studio社区2015。




  • 附加到:脚本代码

  • 可用进程: MicrosoftEdgeCP.exe li>


步骤




  1. 可选:将Edge设置为默认浏览器。

  2. 在Visual Studio中打开您的项目。

  3. 在JavaScript中添加断点。

  4. 在解决方案资源管理器中,选择您的项目

  5. 使用 Ctrl + Shift + W 到在浏览器中查看。

  6. 如果您做了第1步,它将在Edge中打开。

  7. 一旦在Edge中运行,在Visual Studio中,转到Debug> Attach to Process。

  8. 在附加到区域,选择脚本代码。

  9. 从可用进程中选择MicrosoftEdgeCP.exe。

  10. 并在Edge中刷新页面。

  11. 您现在将从Visual Studio IDE进行调试。



设置默认浏览器





将Visual Studio附加到边缘脚本





上面的工作在 Visual Studio社区2015 ,它也可能在以前的版本中起作用。 Hooray!


Is there any way to enable Visual Studio integrated Javascript debugger with Windows 10 Edge? I mean the feature for stepping through the code, set breakpoints, etc. from inside the Visual Studio IDE. I am using Visual Studio 2012 and 2013, perhaps this can be achieved with 2015?

解决方案

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!

这篇关于Visual Studio集成JavaScript调试与Windows 10 Edge的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆