【问题标题】:How do I set up the visual studio code launch.json file to debug F#?如何设置 Visual Studio 代码 launch.json 文件以调试 F#?
【发布时间】:2016-06-26 05:03:35
【问题描述】:

如何在 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# 调试器的教程?

【问题讨论】:

    标签: f# visual-studio-code ionide


    【解决方案1】:

    我认为你需要安装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
            }
        ]
    }
    

    【讨论】:

    • windows系统如何实现这一点
    • @GurbakhshishSingh 正在进行中的工作:github.com/ionide/ionide-vscode-fsharp/pull/344
    • 对我来说,由于更新了 json 规则,它可以正常工作,除了断点之外,它们从不知道为什么会发生? @Kurren
    猜你喜欢
    • 2021-02-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-04
    • 1970-01-01
    • 2018-06-09
    • 2018-02-16
    相关资源
    最近更新 更多