简体   繁体   English

如何在Visual Studio中调试独立的javascript?

[英]How to debug stand-alone javascript in Visual Studio?

Visual Studio is a wonderful IDE for debugging. Visual Studio是用于调试的绝佳IDE。 Currently, Javascript is usually debugged using Firebug or Chrome developer tools. 当前,通常使用Firebug或Chrome开发人员工具调试Javascript。 For websites containing javascript, I understand it is not possible to use Visual Studio. 对于包含javascript的网站,我了解无法使用Visual Studio。 What about stand-alone javascript? 独立JavaScript呢? I would like to debug stand-alone javascript functions in Visual Studio. 我想在Visual Studio中调试独立的javascript函数。 If this is possible, may I know how can it be done? 如果可以的话,我可以知道怎么做吗?

I am using Visual Studio 2012. 我正在使用Visual Studio 2012。

Unfortunately this can't be done. 不幸的是,这无法完成。 The code would have to be in some kind of web project, and then you would have to use IE as your main development browser. 该代码必须在某种Web项目中,然后才能使用IE作为主要的开发浏览器。 Personally I started out years ago using the Visual Studio/IE debugging but find it prohibitively slow now. 我个人是几年前开始使用Visual Studio / IE调试的,但现在发现它的速度太慢了。

Anyway this point is moot anyway because you don't want to debug a web app :) 无论如何,这点很重要,因为您不想调试Web应用程序:)

As far as an alternative solution I can thoroughly recommend WebStorm by JetBrains, they really do a bang up job with the IDEs... and this is coming from a die hard Visual Studio guy! 至于我可以彻底推荐JetBrains的WebStorm的替代解决方案,他们确实在IDE方面做得很出色……这是来自一个顽固的Visual Studio家伙! While I can't profess to being an expert with it the times I have used it I found the configuration reasonably easy, and it fully supports nodejs and all that stuff. 尽管我使用它的时间无法证明自己是专家,但我发现配置相当容易,并且它完全支持nodejs和所有这些东西。

Hope this helps even though it's not the answer you were hoping for 希望这会有所帮助,即使这不是您希望得到的答案

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

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