You're getting this error when trying to debug an F# app on VSCode using Ionide
Unable to launch debugger worker process (vsdbg) through the terminal. spawn xterm ENOENT
You're getting this error when trying to debug an F# app on VSCode using Ionide
Unable to launch debugger worker process (vsdbg) through the terminal. spawn xterm ENOENT
Add a debug config (launch.json) -> Select template .NET Core Launch (console)
Add a task for building the app -> You will be prompted to create this after you try to run the debugger following the previous step
Run from debugger
Here's my example config, same fields but using them from the workspace file instead of directly under .vscode/* (personal preference)
{
"folders": [
{
"path": "."
}
],
"settings": {},
"launch": {
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// Change this path to point to your entrypoint
"program": "${workspaceFolder}/bin/Debug/net6.0/hello-world.dll",
"args": ["Hello"],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"console": "internalConsole"
}
]
},
"tasks": {
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "shell",
"args": [
"build",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
}
]
}
}
Unfortunately, I haven't been able to run it from the Ionide tab. Please let me know if you know how to solve this on WS2.