FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log inLog in 


Debugging Objects

Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog
View previous topic :: View next topic  
Author Message
Harrison Pratt



Des Moines, Iowa USA
Joined: 05 Nov 2000
Posts: 312

PostPosted: 29 Sep 2016 23:04    Post subject: Debugging Objects Reply with quote

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?
Back to top
View user's profile Send private message
Thomas Linder Puls



Copenhagen, Denmark
Joined: 28 Feb 2000
Posts: 3124

PostPosted: 30 Sep 2016 9:46    Post subject: Re: Debugging Objects Reply with quote

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).

_________________
Regards Thomas Linder Puls
Prolog Development Center
Back to top
View user's profile Send private message
Harrison Pratt



Des Moines, Iowa USA
Joined: 05 Nov 2000
Posts: 312

PostPosted: 30 Sep 2016 20:10    Post subject: Reply with quote

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.



Snap_2016.09.30 14.43.25_001.png
 Description:
 Filesize:  119.97 KB
 Viewed:  1391 Time(s)

Snap_2016.09.30 14.43.25_001.png


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum