Using gdb

If BornAgain GUI or a script crashes, re-run under gdb.

To debug a Python script, run

gdb --args /usr/bin/python3 <script>

where the path /usr/bin/python3 must be adapted to point to a Python executable that is not installed via pyenv. Also consider python3-dbg (from Debian package of same name).

If Python is installed via Pyenv, then the command python typically refers to a wrapper script <pyenv_path>/shims/python. In this case, run

gdb -ex r --args bash python <script>

or

gdb `pyenv which python`