Is there a way to break when data changes?

Aug 28, 2012 at 4:10 PM

I love the functionality in C++ where I can specify a variable and have the debugger stop when that variable (ok, actually the memory location) changes.  Is there any way to do this within Pytools?  I would imaging this shouldn't be too hard to implement, if it isn't, but of course, I know very little about what the python interpreter provides and how PyTools works.  

If it isn't possible, are there any clever ways of doing this outside of the debugger?  Just curious...




Aug 28, 2012 at 4:30 PM

There's no direct equivalent to C++'s memory breakpoints which track an actual location in memory being changed.  There are conditional break points but they'll need to be associated with a line of code, but you can then break at that line when some variable changes.  To add one of those you can add a breakpoint, and then right click on it and select Condition and enter a Python expression which will run in the context of that line of code.



Aug 28, 2012 at 4:58 PM

Thanks.. I know tcl has some capability, guess I just assumed Python did as well.  I have used the functionality you suggested, and it works great.. Thanks for the info..