You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The setup I am working on features the entire toolchain in a container (both GDB & GDB-server).
I wonder whether it is possible to configure a debug session via launch.json file such that dap-mode execute the debugger from within the docker container.
In particular I have difficulties to understand the 2 keywords provider and template of the .lsp-docker configuration file.
Should these files be visible in the container? Do you have an example?
Assuming the .lsp-docker part is properly configured, shall I indicate docker-paths in the launch.json keywords miDebuggerPath and debugServerPath?
The text was updated successfully, but these errors were encountered:
sfavazza
changed the title
Debug via containerized toolchain
Debug via containerized toolchain & DAP server
Dec 4, 2024
Based on my investigation it seems that provider and (optional) template must already exist, such that the dap-docker-register will append the Dockerized word to both the newly created provider and template.
E.g. assuming I want to run a GDB session in a container I will have:
Hence to start a debugging session the launch.json file would look like this:
{
"configurations": [
{
"name": "DAP C/C++ (dockerized)",
"type": "abs-path-to-project-cppdbgDocker",
"request": "launch",
"MIMode": "gdb",
"miDebuggerServerAddress": ":${env:TARGET_DBG_PORT}",
// container local paths"miDebuggerPath": "/inside/docker/path/to/gdb",
"miDebuggerArgs": "-x /code/.vscode/.gdbinit",
"program": "<my-program-abs-path>",
"cwd": "${workspaceFolder}",
// launch the debug server connecting to the target"debugServerPath": "/inside/docker/path/gdb-server",
},
]
}
Is this the intended usage? Did I miss anything?
I found a caveat with the vscode-cpptools DAP server. When starting a debug session with the newly registered provider, the GDB-DAP-server expects to find a *.ad7Engine.json file where the * is the value of the launch.json key:
Is this expected?
Does anyone bumped into the same issue with other DAP servers?
The setup I am working on features the entire toolchain in a container (both GDB & GDB-server).
I wonder whether it is possible to configure a debug session via
launch.json
file such that dap-mode execute the debugger from within the docker container.In particular I have difficulties to understand the 2 keywords provider and template of the
.lsp-docker
configuration file.Should these files be visible in the container? Do you have an example?
Assuming the
.lsp-docker
part is properly configured, shall I indicate docker-paths in thelaunch.json
keywordsmiDebuggerPath
anddebugServerPath
?The text was updated successfully, but these errors were encountered: