Sunday, October 23, 2016

Simple init file for the debugger

global WatchText
print("Initialization file")
TestCode.sourcefilename = 'test.py'
inittest()
WatchText.insert('end',("%s      %s\n") % ("x","None") )
WatchText.insert('end',("%s      %s\n") % ("x+y","None" ))
TestCode.usertext = "hello world"
print(TestCode.usertext) 


I load this file using the init menu item, it loads up test.py, the code under test and sets two watch expression.  Once expression is the sum of the other two, and that works fine. n The set up functions for break points and watches will be somewhat simpler as I expose them with common sense. The init files will get more sophisticated, and the debuger remains a smart trap machine.

No comments: