23.8.2. Debug gem5 Python scripts

Start pdb at the first instruction:

./run --emulator gem5 --gem5-exe-args='--pdb' --terminal

Requires --terminal as we must be on foreground.

Alternatively, you can add to the point of the code where you want to break the usual:

import ipdb; ipdb.set_trace()

and then run with:

./run --emulator gem5 --terminal