[英]Visual Studio 2017 debugging vbscript
I'd like to debug a vbscript with Visual Studio 2017 Community Edition and followed the steps mentioned here for VS2015: 我想使用Visual Studio 2017 Community Edition调试vbscript,并按照此处提到的VS2015的步骤进行操作:
I entered 我进入了
cscript.exe /x foo.vbs
in the commandline, but no debugger starts. 在命令行中,但没有调试器启动。 Is there a problem with the 2017th version of VS or are there some steps (eg configuration steps in VS) which are not shown in the video?
2017的VS版本是否有问题,或者是否有一些步骤(例如VS中的配置步骤)未在视频中显示?
Edit: I tried cscript.exe //X foo.vbs
, cscript.exe foo.vbs //X
, cscript.exe //X //D foo.vbs
and cscript.exe foo.vbs //X //D
too 编辑:我试过
cscript.exe //X foo.vbs
, cscript.exe foo.vbs //X
, cscript.exe //X //D foo.vbs
和cscript.exe foo.vbs //X //D
也是
Thanks steff 谢谢steff
Please run your VS2017 as the admin, and then enable the script option under TOOLS->Options->Debugging->Just-In-Time, and then re-debug it again. 请以管理员身份运行VS2017,然后在TOOLS-> Options-> Debugging-> Just-In-Time下启用脚本选项,然后重新调试。
Even if I didn't use the VS2017 community version, but I get the same issue, I found that it was related to the JIT debugging in my side using VS2017 Enterprise version and it works well after I enable it: 即使我没有使用VS2017社区版本,但我遇到了同样的问题,我发现它与使用VS2017企业版的我身边的JIT调试有关,并且在我启用后它运行良好:
Neither of those solutions worked for me. 这些解决方案都不适合我。 Found a workaround on MSDN
在MSDN上找到了解决方法
CSCript.exe requires double-forward-slashes for its own command-line options, because single-slashed arguments are passed to the script itself. CSCript.exe需要双向正斜杠用于其自己的命令行选项,因为单斜线参数将传递给脚本本身。
You want cscript.exe //X
not cscript /X
. 你想要
cscript.exe //X
不是cscript /X
I also suggest the //D
argument so it breaks immediately. 我还建议
//D
参数,以便它立即中断。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.