-
Notifications
You must be signed in to change notification settings - Fork 135
Debugging
Debugging cordless is easiest when using an IDE such as Goland or an extensible editor like VS Code.
As for VS Code, the cordless working directory comes with a configuration that automatically connects to a running debugger.
For debugging, we use delve. Delve needs to be on your PATH
, so that the commands / scripts you are running can find it.
NOTE: These instructions were written for Linux
To create a debug build, go to the root of the cordless working directory and run:
./build.sh
This creates a debug executable called cordless_debug
. This executable prevents the compiler from inlining and optimizing, making debugging a bit easier.
Next, execute the debugger via:
./debug.sh
Before debugging, you first have to define breakpoints. You can do that by clicking left to the desired line-numbers you wish to pause at, or you using whatever shortcut your VS Code has defined for marking the current line. If you are ready, simply hit "Launch" in the "Debug" view of VS Code.
TODO