如何设置 visual studio 代码 launch.json 文件来调试 F#?

How do I set up the visual studio code launch.json file to debug F#?

如何在 launch.json 中设置调试器?

目前,我有

{
    "version": "0.1.0",
    "configurations": [
        {
            // Name of configuration
            // Appears in the launch configuration drop down menu.
            "name": "Launch Lukecxu",
            "request": "launch",
            "cwd": "/Users/lukexu/lukecxu",
            "type": "node",
            // Automatically stop program after launch.
            "stopOnEntry": true,
            "program": "${workspaceRoot}" 
        }
    ]
}

我在网上找到了其中的一些,但它不起作用。它说我应该将 "type" 作为单声道,但是当我将它设置为单声道时,它说类型不受支持。

对于我的系统设置,我安装了 brew install mono 并且还安装了 ionide。

现在我无法单击装订线来设置任何断点,当我按 F5 时它显示 "Cannot launch program '/Users/lukexu/lukecxu'; configuring source maps might help."

VSCode 中是否有设置 F# 调试器的教程?

我认为你需要安装 mono debug extension

安装扩展后,以下配置应该可以工作:

{
    "version": "0.1.0",
    "configurations": [
        {
            // optional "preLaunchTask": "Build" - some way of building your application.
            "externalConsole": true, 
            "name": "Launch",
            "type": "mono",
            // Workspace relative or absolute path to the program.
            "program": "${workspaceRoot}/bin/myapp/myapp.exe",
            "stopOnEntry": true
        },
        {
            "name": "Attach",
            "request": "attach",
            "type": "mono",
            "address": "localhost",
            "port": 55555
        }
    ]
}