Wednesday, October 19, 2016

Did I resolve the debugger speed bump?

The problem boiled down to one thing, since the intrerpreter needed the complete python statement, which included the whole block on a blockcount change. The redneck debugger must really be an automated printfer, its operation simple and observable as python statements.

The fork in the road was either, 1) We can only breakpoint when block count is zero, and it sends the complete statement by tracking block counts and line continuations. 2)n Fake it

I am doing the first.  This debugger does not want inspect.setrace().  It needs to pull lines from the text box, and observably construct the complete first level block.  This is a few lines of ode, it is how the automated printfer works.

I am a big fan of python.  The intrepreter eval function  keeps some state information for physical line look ahead.   Make a third  argument, interpreter state.

So the new plan. Make the small mods necessary for a top level, simple automated printfer.  The only 'inspect' cal it makes back to python is to obtain the line and file number. Then add a few lines of code to make use of system trace on function calls, in some deliberately trivial manner.

No comments: