Page 1 of 1

Debugging Objects

Posted: 29 Sep 2016 23:04
by Harrison Pratt
I suppose these are documented somewhere, but I can't find them:

How can I trace clauses in objects dynamically created from a class in the debugger?

Is it possible to view database facts in a dynamically created object in the debugger?

Re: Debugging Objects

Posted: 30 Sep 2016 9:46
by Thomas Linder Puls
Harrison Pratt wrote:How can I trace clauses in objects dynamically created from a class in the debugger?
I am not sure I fully understand the question. You can set breakpoints, single step in any such code.
Harrison Pratt wrote:Is it possible to view database facts in a dynamically created object in the debugger?
When you expand an object in the debugger (in the variables window) you will see its facts. For example you can expand the "This" variable when inside an object clause.

But you will need to have access to the object that you wish to inspect. If there are particular objects that you want to keep track of you can add it to the watch window (i.e. right click it in the variables window).

Also notice that there is no way to gain access to all the objects of a certain class (unless your program for example saves them in a fact database).

Posted: 30 Sep 2016 20:10
by Harrison Pratt
Thomas,
Forgive my vague question which made it hard for you to give a crisp answer. I expected the debugger to require pre-selection of facts and variables for display separately as it does in conventional code, not realizing than an object is just a more elaborate kind of variable.
That is great -- expanding the object view in the debugger gives both class and object information!
Thanks for your help,
Harrison

P.S. The actual data displayed in the images below won't make sense relative to the code in the test/0 clause because I loaded a nonsense file for privacy reasons.