debugging 使用VSCode、WSL2 +扩展(Ionide数据包、FAKE、核心)调试F#应用程序

xn1cxnb4  于 2022-12-13  发布在  Vscode
关注(0)|答案(1)|浏览(171)

尝试使用Ionide在VSCode上调试F#应用程序时出现此错误

Unable to launch debugger worker process (vsdbg) through the terminal. spawn xterm ENOENT

voase2hg

voase2hg1#

1.在应用程序x1c 0d1x的根文件夹中添加worskspace
1.添加调试配置(launch.json)-〉选择模板.NET核心启动(控制台)
1.添加用于构建应用程序的任务-〉在您尝试按照上一步运行调试器后,系统将提示您创建此任务
1.从调试器运行

下面是我的示例配置,相同的字段,但使用的是工作区文件中的字段,而不是直接位于.vscode/*(个人偏好)下的字段

{
      "folders": [
        {
          "path": "."
        }
      ],
      "settings": {},
      "launch": {
        "version": "0.2.0",
        "configurations": [
          {
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
// Change this path to point to your entrypoint
            "program": "${workspaceFolder}/bin/Debug/net6.0/hello-world.dll",
            "args": ["Hello"],
            "cwd": "${workspaceFolder}",
            "stopAtEntry": false,
            "console": "internalConsole"
          }
        ]
      },
      "tasks": {
        "version": "2.0.0",
        "tasks": [
          {
            "label": "build",
            "command": "dotnet",
            "type": "shell",
            "args": [
              "build",
              // Ask dotnet build to generate full paths for file names.
              "/property:GenerateFullPaths=true",
              // Do not generate summary otherwise it leads to duplicate errors in Problems panel
              "/consoleloggerparameters:NoSummary"
            ],
            "group": "build",
            "presentation": {
              "reveal": "silent"
            },
            "problemMatcher": "$msCompile"
          }
        ]
      }
    }

不幸的是,我还不能从Ionide选项卡运行它。请让我知道,如果你知道如何在WS 2上解决这个问题。

相关问题