From: R. B. <ro...@pa...> - 2006-04-02 01:12:28
|
In working with a debugger for python, I noticed a nice feature which just had a chance to code up and try out in the bash debugger. Rather than start a script inside the debugger, the python debugger allows one to load the debugger at any place in the script and then issue a call to enter give control to the debugger. Here's an example script # Lots of stuff here. ... x=2 source /usr/local/share/bashdb/bashdb-trace # or whereever _Dbg_set_trace y=3 You will be stopped before y=3 in the debugger. This mechanism allows one to run lots of complex code which might otherwise get messed up by the debugger. Another use might be in a large script where running the debugger every step (e.g. configure) is just too slow. - - - At present I can't commit any of this code as sourceforge CVS is down and has been so for two days. (Ironically, this is right when sourceforge send out its monthly status report which was bragging about how great they've been working hard on improving things including reliablity.) |