I can see how to debug python code with pdb in a terminal but I cannot see how to use pdb from within Geany.
The best that I have achieved so far is to add "python3 -m pdb "%f"" to the second line of the build menu. This results is the debugger starting and displaying the first line of the python code. I cannot see how to have the debugger stop on the first line ready for me to enter a pdb command. Instead the code runs to the end.
No doubt I've overlooked something that should be obvious.
Hey there,
Phil via Users wrote:
I can see how to debug python code with pdb in a terminal but I cannot see how to use pdb from within Geany.
I messed around with it and got it working this way:
1. Open the "Build" menu. 2. Click on "Set Build Commands" in its context menu. 3. Click on an empty label in the "Python Commands" section. If you don't have any free in that section, click on an empty label in the "Independent Commands" section. 4. Type in "Debug" or whatever you would like the menu entry to be. 5. Paste your 'python3 -m pdb "%f"' command into the textbox to the right of the label. 6. Click the "OK" button. 7. Now you'll find the "Debug" entry in the "Build" menu.
By the way, thanks for the command. It's very cool.