Visual Studio 2017 debugging vbscript

后端 未结 3 1104
半阙折子戏
半阙折子戏 2020-12-19 09:27

I\'d like to debug a vbscript with Visual Studio 2017 Community Edition and followed the steps mentioned here for VS2015:

Video

I entered

cs         


        
相关标签:
3条回答
  • 2020-12-19 09:38

    CSCript.exe requires double-forward-slashes for its own command-line options, because single-slashed arguments are passed to the script itself.

    You want cscript.exe //X not cscript /X.

    I also suggest the //D argument so it breaks immediately.

    0 讨论(0)
  • 2020-12-19 09:42

    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.

    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:

    0 讨论(0)
  • 2020-12-19 09:58

    Neither of those solutions worked for me. Found a workaround on MSDN

    1. Start Visual Studio.
    2. File -> Open Project.
    3. Point it at "C:\Windows\system32\cscript.exe" (or wherever your windows install directory is).
    4. When you get the elevation permissions dialog, click 'Ignore'.
    5. Go to project properties on the cscript.exe node.
    6. In arguments add '//d '.
    7. In 'Debugger type' change it to script.
    8. Close project properties.
    9. Hit F10.
    0 讨论(0)
提交回复
热议问题