简体   繁体   English

在Visual Studio Web Express 2013或Visual Studio 2015社区中调试JavaScript

[英]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. 在VS的早期版本中,可以使用VS javascript调试器(真棒)来调试任何网站。 The "trick" was to create an empty web project, open IE within the instance of VS. “技巧”是创建一个空的Web项目,在VS实例内打开IE。 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. 我知道这与VS Web Developer Express 2008一样有效,但是我无法使其在Web Express 2013或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/ 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) https://www.sitepoint.com/community/t/ie-javascript-debugging-with-visual-studio-express-a-visual-guide/376​​8 (不幸的是,该图像丢失)

I could debug it in my side using the VS2015 with the "debugger" keyword in the JavaScript code. 我可以在VS2015中使用JavaScript代码中带有“ debugger”关键字的方式调试它。

Of course, please not enable the option "Disable Script debugging" in your IE setting. 当然,请不要在IE设置中启用“禁用脚本调试”选项。

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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