Debug an application
The Nexus extension bundles CodeLLDB and its LLDB runtime for Windows x64 and
Linux x64. Use the nexus debug type. You do not need Microsoft's C/C++ extension
or a separately installed CodeLLDB extension.
Launch Hello
Build the Hello project in Debug configuration.
Save this as .vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Hello",
"type": "nexus",
"request": "launch",
"program": "${workspaceFolder}/build/win64/Debug/hello.exe",
"cwd": "${workspaceFolder}",
"expressions": "simple"
}
]
}
On Ubuntu, use ${workspaceFolder}/build/linux/Debug/hello as program.
Set a breakpoint on an executable line and press F5.
If you created the task in Building, add
"preLaunchTask": "Build Hello" to rebuild before launch.
Debug information
The application must contain debug information. The Hello recipe declares:
Debug Symbols BuildConfiguration[Debug] {
GenerateDebugInfo: Enabled;
}
Selecting Debug alone does not add that option. The compiler executable does not need debug symbols for your application to be debuggable.
What the debugger provides
Breakpoints, stepping, stack frames, variables, watches, and attachment use the
bundled LLDB backend. Use sourceMap when the source paths recorded during
compilation differ from your local checkout.
The default simple expression evaluator is not a Pascal expression parser. Lua debugging is a separate engine/debug-adapter concern; the native debugger does not provide seamless Pascal-to-Lua stepping.
If a breakpoint does not bind, check the actual executable path, its debug information, and the source mapping before changing compiler or editor settings.