Sunday, October 23, 2016

My debugger debugs itself

This debugger runs both traces, all the time.  Yet it is segmented so that I can load the debugger code and run it, step, until, and stop  just fine.  Pretty good to have the traces stack appropriately.

There are still some trivial oddities in the restart and until buttons, plus intelligent user code initiated trapping is being installed.  Code is at 320 lines,including inline help.  But, with set up, debug, initialization; all of that running as python expressions, the parsing inside is.self parsed.

I still have to learn more details on the traps, there is great info I am missing, and some duplication.  But, since the python organization gets wind of this lightweight debugger, they will produce more documentation on the trace backs, since this code exposes them.

Its about 100 lines of code managing the traps, and all the rest is parsing text.

A slighty oddity about exec tkinter interaction

That is what I found, found it because my windows weren't linked, the master field was optional.  But when I run in the exec routine, the interpreter takes a slightly different path in finding window methods,and it could not find the text or label window as the master field was defaulted off. This may be either a tkinter oddity with dual source files, or an exec thing.. So my new rule is link the windows, master is not really optional.

And  the screen shot, we have three debugger windows, each operating normally.  The first debugging the second debugging the third.  The debugger, itself, defines the proper code size this lightweight debugger can handle.

No comments: