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

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

See both variables and code in the debugger?

Post by MichaelBluejay »

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: 634
Joined: Wed Aug 27, 2008 12:57 pm
Contact:

Re: See both variables and code in the debugger?

Post by AndyP »

Hi MichaelBluejay,

That's an interesting idea. Working on a plugin now.
Andy .... LC CLASSIC ROCKS!
AndyP
Posts: 634
Joined: Wed Aug 27, 2008 12:57 pm
Contact:

Re: See both variables and code in the debugger?

Post by AndyP »

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 .... LC CLASSIC ROCKS!
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: See both variables and code in the debugger?

Post by Klaus »

Way cool, Andy! :-)
mrcoollion
Posts: 744
Joined: Thu Sep 11, 2014 1:49 pm

Re: See both variables and code in the debugger?

Post by mrcoollion »

Love it... :D
MichaelBluejay
Posts: 245
Joined: Thu Jul 01, 2010 11:50 am

Re: See both variables and code in the debugger?

Post by MichaelBluejay »

Wow, thanks!
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10502
Joined: Wed May 06, 2009 2:28 pm

Re: See both variables and code in the debugger?

Post by dunbarx »

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: 634
Joined: Wed Aug 27, 2008 12:57 pm
Contact:

Re: See both variables and code in the debugger?

Post by AndyP »

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 .... LC CLASSIC ROCKS!
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: See both variables and code in the debugger?

Post by bogs »

@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: 634
Joined: Wed Aug 27, 2008 12:57 pm
Contact:

Re: See both variables and code in the debugger?

Post by AndyP »

]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 .... LC CLASSIC ROCKS!
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: See both variables and code in the debugger?

Post by FourthWorld »

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 development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: See both variables and code in the debugger?

Post by bogs »

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: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: See both variables and code in the debugger?

Post by FourthWorld »

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 development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
MichaelBluejay
Posts: 245
Joined: Thu Jul 01, 2010 11:50 am

Re: See both variables and code in the debugger?

Post by MichaelBluejay »

FourthWorld wrote: Fri Jan 08, 2021 9:09 pmHard 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: 245
Joined: Thu Jul 01, 2010 11:50 am

Re: See both variables and code in the debugger?

Post by MichaelBluejay »

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