如何在 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# 调试器的教程?
最佳答案
我认为你需要安装 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
}
]
}
关于f# - 如何设置 Visual Studio 代码 launch.json 文件以调试 F#?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38035370/