Hi all,
I'm just getting started with Nim, but I'm liking it a lot!
I just grabbed VSCode and set up with the Nim extension and Native Debug, but I'm having an issue getting GDB to function.
I've tried GDB directly from the console and it works fine, but whenever I try to debug from inside VSCode, it always says "Debug adapter process has terminated unexpectedly" after executing. The code compiles and executes fine, but the debugger fails...
I've seen this issue discussed other places, but I haven't found any definitive answers on what to do about it? Has anyone here had this issue and gotten past it?
I'm using VSCode 1.23.1, GDB 7.11.1 and Nim 0.18.0 for Linux:amd64.
Here is my launch.json file:
{
"version": "0.2.0",
"configurations": [
{
"name": "MyProject Debug",
"type": "gdb",
"request": "launch",
"target": "./bin/MyProject",
"preLaunchTask": "Build Debug",
"cwd": "${workspaceRoot}",
"valuesFormatting": "prettyPrinters",
"printCalls": true,
"showDevDebugOutput": true
}
]
}
and my tasks.json file:
{
"version": "2.0.0",
"tasks": [
{
"label": "Build Debug",
"type": "shell",
"command": "nim c -d:debug --nimcache:./nimcache --out:./bin/MyProject --debuginfo --lineDir:on --debugger:native ./src/MyProject.nim",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
and I'm also using a nim.cfg file along with my main module:
MyProject.nim.cfg:
path="$projectDir/models"
debugger:"native"
Thanks for any help