Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Debugging

Marcel Schramm edited this page Oct 25, 2020 · 1 revision

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

VS Code

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.

Goland

TODO

Clone this wiki locally