You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
4 weeks ago | |
|---|---|---|
| .. | ||
| project | 4 weeks ago | |
| README.md | 4 weeks ago | |
README.md
Demo project
A small C++17 calculator used as the debug target for this example. The same source code is copied into both the remote container (where it is compiled and debugged) and the devstation container (where you edit and browse it).
Build
cmake -DCMAKE_BUILD_TYPE=Debug -S . -B build
cmake --build build -j
This produces build/debugapp compiled with -g3 -O0 (full debug info, zero
optimisation) and generates compile_commands.json for clangd.
Good debugging targets
| Feature | Where to try it |
|---|---|
| Breakpoints | Any method in Calculator — e.g. Calculator::divide |
| Conditional breakpoint | In runDemo() at the for loop, set condition i == 3 |
| Variable inspection | m_accumulator, m_history, m_callCount |
| Watch expressions | m_history.size(), sum + diff |
| Call stack | Step into formatResult() to see the stack frames |
| Step over / into / out | The runDemo() loop exercises all three |