List all Custom Properties in a stack

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: List all Custom Properties in a stack

Post by jacque » Thu Sep 15, 2022 5:09 pm

I believe the documentation for conditional breakpoints is explained in the user guide, but I haven't looked in years. Conditional breakpoints have been available for a long time.

The state of the breakpoints are indicated in the Breakpoints pane of the variable watcher at the bottom of the editor. I use them frequently because they keep my script clean of debugging clutter and I don't need to remember to remove anything before distributing a stack. Clearing all breakpoints from the menu item is all I need to do.

I also use in-line conditionals, but only for those cases where a problem occurs frequently in the same place in complex handlers. But for one-off issues the red dots are quick, convenient, and automatically temporary.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: List all Custom Properties in a stack

Post by dunbarx » Thu Sep 15, 2022 6:50 pm

Jacque.

It was the ability to set a conditional via a red dot that was the news for me.

Craig

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: List all Custom Properties in a stack

Post by marksmithhfx » Thu Sep 15, 2022 6:54 pm

jacque wrote:
Thu Sep 15, 2022 5:09 pm
The state of the breakpoints are indicated in the Breakpoints pane of the variable watcher at the bottom of the editor. I use them frequently because they keep my script clean of debugging clutter and I don't need to remember to remove anything before distributing a stack. Clearing all breakpoints from the menu item is all I need to do.
Hi Jacque, I just posted a "possible bug" related to clearing a breakpoint (https://quality.livecode.com/show_bug.cgi?id=23940). The user guide I checked did not have complete information on setting conditional red dot breakpoints. There is this, but I was not able to find any discussion of conditional red-dots:
To activate the debugger, first ensure that Script Debug Mode is turned on in the Development menu. Then open up the script you want to debug and click in the gray bar to the left of the line where you want to open the debugger. Alternatively you can write the command breakPoint into the script. Using the breakPoint command allows you to break conditionally – if tVar is true then breakPoint.
Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: List all Custom Properties in a stack

Post by jacque » Thu Sep 15, 2022 8:26 pm

I just posted a "possible bug" related to clearing a breakpoint (https://quality.livecode.com/show_bug.cgi?id=23940). The user guide I checked did not have complete information on setting conditional red dot breakpoints.
Good catch. There have been various issues with the Breakpoints pane in the past, looks like you found another one. I also just searched the User Guide and couldn't find a reference to conditional red dots, so now I'm not sure where I heard about it. I only know I've been using them for many years.

The lack of documentation might be a good candidate for another QCC report.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bobcole
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 161
Joined: Tue Feb 23, 2010 10:53 pm

Re: List all Custom Properties in a stack

Post by bobcole » Fri Sep 16, 2022 12:42 am

Jacque.
It was the ability to set a conditional via a red dot that was the news for me.
Craig
Me too. After 14 years of playing with Revolution/LiveCode I am happy to know about Conditional Breakpoints.
I think this capability will help me with debugging.
Thanks Jacque,
Bob

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: List all Custom Properties in a stack

Post by jacque » Fri Sep 16, 2022 1:08 am

marksmithhfx wrote:
Sun Aug 07, 2022 8:56 pm
For me I can comment out a "breakpoint" and still have a "breadcrumb" that says "this was a tricky part to get right" (usually I am using breakpoints or their alternatives at a point in the program where the expected result is not happening!!!). When you uncheck the red dot that history is lost.
Since we're talking about this, you can disable a red dot breakpoint in the Breakpoint pane of the variable warcher. That leaves it in place but it won't break into the debugger until you enable it again. It's another way to track your debugging history.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bobcole
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 161
Joined: Tue Feb 23, 2010 10:53 pm

Re: List all Custom Properties in a stack

Post by bobcole » Fri Sep 16, 2022 4:06 am

by Jacque:
...you can disable a red dot breakpoint in the Breakpoint pane of the variable warcher. That leaves it in place but it won't break into the debugger until you enable it again.
Screen Shot.jpg
I wonder how many times over 14 years that I have simply overlooked the Breakpoints pane.
Thanks Jacque for pointing out this capability of LiveCode's Editor.
Much appreciated,
Bob

stam
Posts: 3070
Joined: Sun Jun 04, 2006 9:39 pm

Re: List all Custom Properties in a stack

Post by stam » Fri Sep 16, 2022 9:16 am

I think i had seen this feature before but if i ever (rarely) need to use conditional breakpoints, i'll usually add this to to the script as it's obvious.

One of the issues with editing the 'red dot' is that there is no visual feedback that the breakpoint has been changed to a conditional breakpoint... it would be better if it used a different colour or something to denote it's a conditional breakpoint.

On the other hand, putting it in the script makes it both obvious and easy to enable/disable but just uncommenting/commenting, without having to go to dialog boxes etc...

S.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: List all Custom Properties in a stack

Post by dunbarx » Fri Sep 16, 2022 2:24 pm

Stam.

I earlier on recommended yellow :wink:

Craig

stam
Posts: 3070
Joined: Sun Jun 04, 2006 9:39 pm

Re: List all Custom Properties in a stack

Post by stam » Fri Sep 16, 2022 5:41 pm

dunbarx wrote:
Fri Sep 16, 2022 2:24 pm
I earlier on recommended yellow :wink:
I vote for deep purple ;)

Joking aside, traditionally yellow is used for 'warnings' in IDEs for other languages - these don't exist in the current LC IDE but i'm under the impression these may be coming in the new one (or I may have misunderstood...)

Post Reply