The workspace provides an easy and reproducible way to test the functionality present in the @theia/cpp-debug
extension.
note: ATM debugging does not work in Gitpod. Since GDB uses ptrace to attach to the debuggee and ptrace requires the docker container to be started with special permissions.
a.cpp
: simple C/C++ program for debug purposestasks.json
: task configuration file (executes the compilation of the C/C++ program)launch.json
: debug launch configuration file (launches the debug session)
Testing the memory-view
- open
cpp-debug-workspace
as a workspace. - compile the program (use
F1
+Run Task...
and selectcompile example
) - set breakpoint(s) in
a.cpp
- start the debug session using
Debug
+Start Debugging
from the main menu - open the
memory-view
usingView
+Memory
from the main menu - in the memory view, input
$sp
in the location input field (thememory-view
should display output)