Sunday, October 16, 2016

When your debugger is sitting inside the intrepeter

Then all the heavy lifting of extracting and formatting variables is done by the interpreter itself.  Then you add the search and replace functions of the text box.  The file dialog is self contained, and just dumps into the text box.
So, the only variables left, really, for the debugger code are the line numbers where the insert cursor sits, in either box. With that line number you are either adding to the  internal list of break points, or doing add and delete on the watch text.  The watch list text has all the user watch variables by exact name, first atom on the line, so text box also makes a good symbol table,and its automatically updated.

No 'go into' or 'step out' of, no step.  Add them in later, but this is just about done and coming in at 150 lines of code.

The beauty of the Redneck layout, ywo plain text windows, and some buttons.  Anyone looking at that will say, that's simple, a redneck could work this.  Set up? Dump this code in the Lib module, screw path set up.  Just make a batch command file and put it somewhere you know the OS can find it. No dependencies, except tkinter fnd file dialog. So, I just work in the tkinter, and tkinter is three layers deep in my folders, as short as I could get it.

An immediate tool, like a short snippet of a command line the python developer has, a utility.  He can take the lightweight debug tool, to the spot where the problem lies.

No comments: