5

如何在 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}" 
        }
    ]
}

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

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

现在我不能点击排水沟来设置任何断点,当我按下 F5 时它说"Cannot launch program '/Users/lukexu/lukecxu'; configuring source maps might help."

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

4

1 回答 1

6

我认为您需要安装单声道调试扩展

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

{
    "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
        }
    ]
}
于 2016-06-27T00:23:58.673 回答