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

Debugging

Kreato edited this page Apr 7, 2021 · 1 revision

Debugging gord is easiest when using an IDE such as Goland or an extensible editor like VS Code. As for VS Code, the gord 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 gord working directory and run:

./build.sh

This creates a debug executable called gord_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