See both variables and code in the debugger?

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: Klaus, FourthWorld, heatherlaine, kevinmiller

MichaelBluejay
Posts: 216
Joined: Thu Jul 01, 2010 11:50 am

See both variables and code in the debugger?

Post by MichaelBluejay » Fri Jan 08, 2021 8:59 am

Ridiculously, the list of variables in the debugger is at the bottom of the script editor, so both the script and the list of variables competes for space. The larger I make the list of variables, the less code I can see, and vice-versa. The variables list ought to be listed in a separate pane or window so the programmer can see both the list of variables and the code at the height of the screen. I have a 27" screen but LC forces me to waste it.

Is there in fact some way to show a screen-high list of variables without being at the expense of how much code I can see? Are there any 3rd party debuggers? I couldn't find any.

AndyP
Posts: 524
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: See both variables and code in the debugger?

Post by AndyP » Fri Jan 08, 2021 10:58 am

Hi MichaelBluejay,

That's an interesting idea. Working on a plugin now.
Andy Piddock

http://2108.co.uk/tinyide/ - Mini LC IDE alternative

http://2108.co.uk/script-editor-themer/ - Script Editor colour theming

http://livecodeshare.runrev.com/stack/897/LiveCode-Multi-Search - Search across 8 LC resources

AndyP
Posts: 524
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: See both variables and code in the debugger?

Post by AndyP » Fri Jan 08, 2021 1:40 pm

A lot easier than I thought it would be.
2021-01-08_13-33-27.png
This can be docked left or right to the editor or free floating.

Finishing off and will upload to Sample Stacks later today.
Andy Piddock

http://2108.co.uk/tinyide/ - Mini LC IDE alternative

http://2108.co.uk/script-editor-themer/ - Script Editor colour theming

http://livecodeshare.runrev.com/stack/897/LiveCode-Multi-Search - Search across 8 LC resources

Klaus
Posts: 12285
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: See both variables and code in the debugger?

Post by Klaus » Fri Jan 08, 2021 1:50 pm

Way cool, Andy! :-)

mrcoollion
Posts: 610
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: See both variables and code in the debugger?

Post by mrcoollion » Fri Jan 08, 2021 2:01 pm

Love it... :D

MichaelBluejay
Posts: 216
Joined: Thu Jul 01, 2010 11:50 am

Re: See both variables and code in the debugger?

Post by MichaelBluejay » Fri Jan 08, 2021 2:43 pm

Wow, thanks!

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7577
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: See both variables and code in the debugger?

Post by dunbarx » Fri Jan 08, 2021 2:50 pm

Andy.

Eager to see your work.

I use a 32" monitor exclusively for the SE, rotated on its side so it is rather tall. Though I can see a lot of real estate, I still have to look from on high to down low constantly, so being able to see the variable pane right next to the code being debugged would be a treat.

Now I need a huge square monitor.

But does the variable pane in your gadget scroll? I do not see a scrollbar.

Craig

AndyP
Posts: 524
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: See both variables and code in the debugger?

Post by AndyP » Fri Jan 08, 2021 3:42 pm

dunbarx wrote:
Fri Jan 08, 2021 2:50 pm

But does the variable pane in your gadget scroll? I do not see a scrollbar.

Craig
Yes it does.
Andy Piddock

http://2108.co.uk/tinyide/ - Mini LC IDE alternative

http://2108.co.uk/script-editor-themer/ - Script Editor colour theming

http://livecodeshare.runrev.com/stack/897/LiveCode-Multi-Search - Search across 8 LC resources

bogs
Posts: 5252
Joined: Sat Feb 25, 2017 10:45 pm

Re: See both variables and code in the debugger?

Post by bogs » Fri Jan 08, 2021 4:31 pm

@Andy - that is sooooooooo cool !

I think I should point out that you *can* also pop any variable your interested in keeping track of out of that pane and into a separate window of it's own. As well, Mikey made this invaluable tip (among many gems over the year(s)) -
Mikey wrote:
Mon Feb 18, 2019 8:27 pm
@bogs
if you're trying to debug your app after it's compiled, you can take advantage of the fact that LC is interpreted at runtime by adding something like:

Code: Select all

on mouseUp
   ask "Command, please"
   if it is not empty then do it
end mouseUp
That's all it takes to get started with adding the ability to execute arbitrary code on the fly.

You could check the contents of a global if you responded with:

Code: Select all

global goop; answer goop

** Note by bogs - the above and below can also be used within the IDE itself ~
Somehow, I have misplaced the bookmarks I made of a similar post, and an afternoon of looking failed to turn it up :oops:

I'll have to see if I can do better when I wake up for sure.
Image

AndyP
Posts: 524
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: See both variables and code in the debugger?

Post by AndyP » Fri Jan 08, 2021 6:11 pm

]HI All,

The Variable Monitor is now on Sample Stacks.

[attachment=0]2021-01-08_18-55-42.png[/attachment

Please place in your plugins folder and restart LiveCode.
Open the Variable Monitor plugin and hit the refresh button to start mirroring the Script Editor variable pane.

Looking forward to your feedback and suggestions.
Attachments
2021-01-08_18-55-42.png
Andy Piddock

http://2108.co.uk/tinyide/ - Mini LC IDE alternative

http://2108.co.uk/script-editor-themer/ - Script Editor colour theming

http://livecodeshare.runrev.com/stack/897/LiveCode-Multi-Search - Search across 8 LC resources

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8539
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: See both variables and code in the debugger?

Post by FourthWorld » Fri Jan 08, 2021 9:09 pm

The variables used to be in a separate window. People said it was too fiddly.

Hard to come up with a design that pleases a diverse audience.

Fortunately, with the IDE being all scripted, we have many options for tooling to choose from.
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5252
Joined: Sat Feb 25, 2017 10:45 pm

Re: See both variables and code in the debugger?

Post by bogs » Fri Jan 08, 2021 9:42 pm

Well, with the ability to either pop out the windows or not, don't you have the best of both worlds?
Image

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8539
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: See both variables and code in the debugger?

Post by FourthWorld » Sat Jan 09, 2021 12:58 am

bogs wrote:
Fri Jan 08, 2021 9:42 pm
Well, with the ability to either pop out the windows or not, don't you have the best of both worlds?
Depending on how it's done it may be a patent infringement. ;)
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

MichaelBluejay
Posts: 216
Joined: Thu Jul 01, 2010 11:50 am

Re: See both variables and code in the debugger?

Post by MichaelBluejay » Sat Jan 09, 2021 2:47 am

FourthWorld wrote:
Fri Jan 08, 2021 9:09 pm
Hard to come up with a design that pleases a diverse audience.
Not at all. You just give them the option to do it one way or the other, then everyone on both sides is happy.

MichaelBluejay
Posts: 216
Joined: Thu Jul 01, 2010 11:50 am

Re: See both variables and code in the debugger?

Post by MichaelBluejay » Sat Jan 09, 2021 2:50 am

AndyP wrote:
Fri Jan 08, 2021 6:11 pm
The Variable Monitor is now on Sample Stacks.
Where is this Sample Stacks of which you speak?

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”