如何再vscode调试net framework程序(非netcore)

launch.json 配置如下:

{
    "version": "0.2.0",
    "configurations": [
         {
             "name": "MyLauncher", //调试器名称
             "type":"clr",    //解析命令
             "request": "launch",
             "preLaunchTask": "mybuild",  //调试任务
             "program": "${workspaceFolder}/bin/Debug/MusicPlayer.exe",  //程序地址
             "args":[],
             "console": "internalConsole",
             "stopAtEntry": false,
             "internalConsoleOptions": "openOnSessionStart"
         }
    ]
 }

tasks.json 配置如下:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "mybuild",  //任务名称
            "command":"${workspaceFolder}/bin/Debug/MusicPlayer.exe",  //程序地址
            "type":"shell", 
            "args":[
                "MusicPlayer.csproj",  //项目配置文件
                "/t:Build",
                "/p:Configuration=Debug",
                "/p:Platform=\"AnyCPU\""
            ]
        }
    ]
}

 参考地址:https://stackoverflow.com/questions/47707095/visual-studio-code-for-net-framework

相关文章:

  • 2021-06-09
  • 2021-08-28
  • 2021-10-19
  • 2022-12-23
  • 2021-07-01
  • 2022-12-23
  • 2022-01-21
  • 2022-12-23
猜你喜欢
  • 2022-02-01
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
相关资源
相似解决方案