This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author THRlWiTi
Recipients THRlWiTi
Date 2016-04-10.12:22:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460290929.06.0.199912788484.issue26728@psf.upfronthosting.co.za>
In-reply-to
Content
I usually insert the following line in the middle of code to start the debugger from there:

import pdb; pdb.set_trace()

More often than not, I need to run some commands immediately after entering the debug mode, e.g. watch (display) some variables, create some additional break points, etc.

AFAIK currently you have to enter those commands manually on each run and there is no simple way to pass those commands from the source code.

Of-course one can invoke pdb as a script ("python3 -m pdb -c ...") and pass the desired commands to the script. But still using pdb.set_trace() is a popular method and I think it would be very useful to have set_trace() accept a list of strings as arguments and execute them right after entering the debugger.
History
Date User Action Args
2016-04-10 12:22:09THRlWiTisetrecipients: + THRlWiTi
2016-04-10 12:22:09THRlWiTisetmessageid: <1460290929.06.0.199912788484.issue26728@psf.upfronthosting.co.za>
2016-04-10 12:22:09THRlWiTilinkissue26728 messages
2016-04-10 12:22:08THRlWiTicreate