Running Indexchain Software in Debug Mode

Introduction

To run Indexchain software in debug mode, follow these steps.

Install gdb

sudo apt-get install gdb

Run Indexchain Daemon With gdb Tool

Initiate your daemon using with gdb -args as a prefix.

For example, the below command would initiate the Indexchain daemon with mining active and a designated pubkey.

gdb -args ./src/komodod -gen -genproclimit=2 -pubkey="03af2412ebf9517a43d192193490476fd0a44312c70755e07eb03b6d71338ebc9d"

::: tip

If you are having trouble initiating Indexchain in the shell, try use the absolute path to komodod. For example, /home/$USERNAME/komodo/src/komodod

:::

The shell should return the following prompt.

gdb>

Execute run in the shell to start Indexchain in debug mode.

gdb> run

Retrieving Backtrace Data

Whenever Indexchain crashes, you will again see gdb> as a prompt.

To recall the last stages of Indexchain before the crash, execute the following command.

Command

gdb> backtrace

The returned data can be shared with any Indexchain developer to assist in troubleshooting Indexchain development.

Select and highlight all relevant data using the cursor, and then use CTRL + SHIFT + C to copy to the clipboard.

Last updated