如何设置visual studio代码启动。要调试f#的json文件?

时间:2022-06-28 23:10:02

How do I set up the debugger in launch.json?

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

Currently, I have

目前,我有

{
    "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}" 
        }
    ]
}

I found some of this online but it's not working. It said I should have "type" as mono but when I set it has mono it said type not supported.

我在网上找到了一些,但没用。它说我应该有“type”作为mono,但是当我设置它的时候,mono它说类型不支持。

For my system settings I did brew install mono and I also have ionide installed.

在我的系统设置中,我确实安装了mono,我也安装了电离装置。

Right now I can't click the gutter to set any break points and when I hit F5 it says "Cannot launch program '/Users/lukexu/lukecxu'; configuring source maps might help."

现在我不能点击gutter设置任何断点,当我点击F5时,它说“不能启动程序”/用户/lukexu/lukecxu;配置源映射可能会有帮助。

Is there a tutorial to set up F# debugger in VSCode?

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

1 个解决方案

#1


5  

I think that you need to install mono debug extension

我认为您需要安装mono调试扩展。

After you've installed extension following configuration should work:

在您安装了扩展后,以下配置应该工作:

{
    "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
        }
    ]
}

#1


5  

I think that you need to install mono debug extension

我认为您需要安装mono调试扩展。

After you've installed extension following configuration should work:

在您安装了扩展后,以下配置应该工作:

{
    "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
        }
    ]
}