Hi,
I was looking for a way of specifying a condition for stopping at a breakpoint when I opened its properties. I found 2 fields: comment and action.
The comment is the text that appears when you hover over the breakpoint marker; has anybody found this to be useful?
What about action? What is it intended for? What do I type in there?
Is it possible to specify a break condition at all?
-
- VIP Member
- Posts: 147
- Joined: 5 Dec 2012 7:29
Breakpoint properties and conditions
You do not have the required permissions to view the files attached to this post.
Mutall Data Management Technical Support
-
- VIP Member
- Posts: 1466
- Joined: 28 Feb 2000 0:01
-
- VIP Member
- Posts: 215
- Joined: 24 Apr 2007 12:26
-
- VIP Member
- Posts: 147
- Joined: 5 Dec 2012 7:29
Thomas,
The first attachment shows a point in the code where I want to break and observe certain variables under some condition. The problem is that very often I have to Debug Run very many times before I get to the condition of interest (and that is tiresome). I solve this by doing what is illustrated in the 2nd attachment: adding an if statement and breaking on the desired condition. This happens so often (and sometimes I forget to remove the extra code after debugging) that I wish conditional breaking was supported. Is there an alternative to my approach? Is it likely that future versions of Prolog will support conditional breakpoints?
The first attachment shows a point in the code where I want to break and observe certain variables under some condition. The problem is that very often I have to Debug Run very many times before I get to the condition of interest (and that is tiresome). I solve this by doing what is illustrated in the 2nd attachment: adding an if statement and breaking on the desired condition. This happens so often (and sometimes I forget to remove the extra code after debugging) that I wish conditional breaking was supported. Is there an alternative to my approach? Is it likely that future versions of Prolog will support conditional breakpoints?
You do not have the required permissions to view the files attached to this post.
Mutall Data Management Technical Support
-
- VIP Member
- Posts: 1466
- Joined: 28 Feb 2000 0:01
-
- VIP Member
- Posts: 147
- Joined: 5 Dec 2012 7:29
-
- VIP Member
- Posts: 458
- Joined: 5 Nov 2000 0:01
-
- VIP Member
- Posts: 147
- Joined: 5 Dec 2012 7:29
Thank you Harrison.
When I got this response from Thomas, I searched this forum for further tips on debugging. I found 2 that I think are very useful.
The first one was Run in Window which allows me to see outputs without having to always include a readchar()=_ as in this sample:-
The second one was a way of navigating the code while not running it (in a way I was not aware of): Go to Position on Clipboard.. Thomas has a video that explains it very well.
When I got this response from Thomas, I searched this forum for further tips on debugging. I found 2 that I think are very useful.
The first one was Run in Window which allows me to see outputs without having to always include a readchar()=_ as in this sample:-
Code: Select all
run() :-
X= array2M{integer}::newAtomic(2,2),
I = X:get(0,0),
stdio::write(I).,
stdio::readChar()=_.
Mutall Data Management Technical Support
-
- VIP Member
- Posts: 1466
- Joined: 28 Feb 2000 0:01
The mentioned video is on youtube: Dump Demo - Visual Prolog 7.3 - IDE demonstration.
Regards Thomas Linder Puls
PDC
PDC