Debug menuItems Grayed Out: Can't run 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

Post Reply
spencer
Posts: 71
Joined: Mon May 09, 2011 3:01 pm

Debug menuItems Grayed Out: Can't run debugger

Post by spencer » Wed Jan 04, 2012 5:13 pm

Sometimes it works, sometimes not, can't figure out why. I'd expect to be in the script editor, set a breakpoint (OK so far), then run. Can't run. Change to browser tool? No. Toggle "Script Debug Mode"? No. Change tool again? No. Toggle again? No. Look in Tutorials, Lessons? Nothing. Look in Disctionary? No. Found generalities on the BYU webpage on debugging:
http://livecode.byu.edu/indexgeneric.php, but nothing about "run" being grayed out.

Google "How to use LiveCode Debugger"? Some people used to have problems. Maybe old versions of LiveCode on my machine? Sigh. If I take off the personal version I paid for, then I have to find the license info again to use it again. Best to do that? Thanks for thinking about this for me.

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

Re: Debug menuItems Grayed Out: Can't run debugger

Post by dunbarx » Wed Jan 04, 2012 5:23 pm

Is the "script debug mode" menuItem checked in the "Development" menu? There is a similar menuItem in the "debug" menu when you are actually debugging, which is what you are talking about, I think. I have found this to be a little unstable from time to time when checking one or the other depending on whether you are in the IDE or actually debugging.

Craig Newman

spencer
Posts: 71
Joined: Mon May 09, 2011 3:01 pm

Re: Debug menuItems Grayed Out: Can't run debugger

Post by spencer » Wed Jan 04, 2012 5:58 pm

I quit out of LiveCode, then opened the stack I'd been working on again. Yes, "Script Debug Mode" is checked in the "Development" menu. Don't remember seeing the "Development" menu recently. The "Debug" menu is no longer there, can't get it back. The debugger works. Thanks.

spencer
Posts: 71
Joined: Mon May 09, 2011 3:01 pm

Re: Debug menuItems Grayed Out: Can't run debugger

Post by spencer » Thu Jan 12, 2012 3:31 am

Toggling the "Script debug mode" in either the "Development" menu or the "Debug" menu does not seem to make the "Run" menuItem available. Here is what I did:

Open LiveCode Version 5.02, freshly downloaded this Monday
Pull down the "File" menu and select "Open Recent Stacks" and select " week3Stacks/collisionTerrain.livecode"
(no changes made to the downloaded stack)

script debug mode NOT checked in "Development" menu
open button "start" script
now have "Debug Menu" instead of "Development" menu
put breakpoint next to "startGame"
script debug mode NOT checked in "Debug" menu
"run" in "Debug" menu is grayed out
script debug mode IS checked in "Debug" menu
"run" in "Debug" menu is grayed out
choose "Run" (browse) tool
now have "Development" Menu instead of "Debug" menu
script debug mode IS checked in "Development" menu
typed in the text above, and the menus changed when I went back
now have "Debug Menu" instead of "Development" menu
script debug mode IS checked in "Debug" menu
"run" in "Debug" menu is grayed out
choose the Edit (pointer) tool
now have "Development" Menu instead of "Debug" menu
script debug mode IS checked in "Development" menu
typed in the text above, and the menus changed when I went back
now have "Debug Menu" instead of "Development" menu
script debug mode IS checked in "Debug" menu
"run" in "Debug" menu is grayed out
so see if "Run" is NOT grayed out when I repeat the above
choose "Run" (browse) tool
now have "Development" Menu instead of "Debug" menu
script debug mode IS checked in "Development" menu
click on the "Start" button
rocket crashed, game over, the breakpoint is still next to "StartGame" in the "Start" button.

I really don't know how to work this debugger.

Help! Thanks.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Debug menuItems Grayed Out: Can't run debugger

Post by sturgis » Thu Jan 12, 2012 4:08 pm

Open your script, set your breakpoints, click the green arrow in the script window. It will as you which handler to run to start debugging. (like mouseup from your start button script)

At this point the breakpoints will work, a debug session is actually started. First breakpoint it will pause allowing you to see variable states and whatnot. Can hit the green arrow again to continue execution or use the menu to do so. All the greyed out stuff won't be grey anymore. Thats about my knowledge limit to the debugger.

spencer
Posts: 71
Joined: Mon May 09, 2011 3:01 pm

Re: Debug menuItems Grayed Out: Can't run debugger

Post by spencer » Sun Jan 15, 2012 3:52 am

Woohoo, it works! Now when I run a pristine newly unzipped stack, ie, "CollisionTerrain.livecode", with a breakpoint in the "Start" button on "startGame", I get an error:

button "start": execution error at line 2 (Handler can't find handler) near "startGame", char 1

THere should be no error. The button only has one line, the startGame handler is in the card script, I don't know why it can't find it. I'm going to delete all LiveCode versions from all my partitions, and reinstall, and try it again. Maybe it is a path problem. I'm running the stacks in a sandbox, but the app is on my HD. My old version is on a different partition of that HD. Quitting and restarting clears it up for awhile. It comes back. Anyone have anything like this?

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Debug menuItems Grayed Out: Can't run debugger

Post by sturgis » Sun Jan 15, 2012 3:57 am

Can you post the zipped stack? I'll try it here on a couple systems and see if I can get it to error out here.

spencer
Posts: 71
Joined: Mon May 09, 2011 3:01 pm

Re: Debug menuItems Grayed Out: Can't run debugger

Post by spencer » Sun Jan 15, 2012 8:40 pm

Thanks! "The file is too big, maximum allowed size is 256 KiB." It is in the "Week3stacks.zip". Zipped by itself is 684KB. May I email it to you?

Progress! Pulling down the "Help" menu located the User Manual, which has a section on the debugger. That did not come up in any of my searches. Odd. The start center was not starting as the preferences were set to not start it. It is very good. The "Resources" button in my LiveCode does not do anything. This helps.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Debug menuItems Grayed Out: Can't run debugger

Post by sturgis » Sun Jan 15, 2012 8:56 pm

Sure, bonnmike at gmail dot com.

The resources button doesn't pop up the lvecode resource center? That is pretty strange. Not that it has any debugger help (other than a link to the user guide)

spencer
Posts: 71
Joined: Mon May 09, 2011 3:01 pm

Re: Debug menuItems Grayed Out: Can't run debugger

Post by spencer » Sun Jan 29, 2012 2:30 pm

What is the "Resources" button supposed to do? I've re-downloaded and reinstalled LiveCode 5.02, but still no "Resources" button. The re-installation did fix the application browser that had all the objects in the LiveCode GUI listed in the left hand column. The debugger works the way I'd expect it to work now.

I've asked support@runrev.com, and was asked to send a picture of what resources button I was talking about. Got no answer. It is that "Resources" button between the "Tutorials" and "Dictionary". Last week, right before the webinar, it worked for the first time, once, and on that page was the script to resize fonts. It does not work anymore. Can't find that anywhere now. What do you see when you click it?

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Debug menuItems Grayed Out: Can't run debugger

Post by sturgis » Sun Jan 29, 2012 3:55 pm

Out of curiosity, if you click the resources button and then execute "put the openstacks" in the message box, does it show revResourceCenter as one of the stacks?

If so, you might then try "set the loc of stack "revResourceCenter" to the screenloc" on the off chance it has disappeared off the edge of the screen.

spencer
Posts: 71
Joined: Mon May 09, 2011 3:01 pm

Re: Debug menuItems Grayed Out: Can't run debugger

Post by spencer » Mon Jan 30, 2012 2:15 am

That's it! Yes, it is in openstacks, and appears with "set the loc of stack "revResourceCenter" to the screenloc"! I should have been able to figure that out. THANK YOU.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Debug menuItems Grayed Out: Can't run debugger

Post by sturgis » Mon Jan 30, 2012 2:28 am

Its one of those things thats only obvious after the first time you figure it out. The only reason I thought of it is I have a multi-monitor set up and if you change monitor relationship things can end up in no-mans land.

spencer
Posts: 71
Joined: Mon May 09, 2011 3:01 pm

Re: Debug menuItems Grayed Out: Can't run debugger

Post by spencer » Wed Feb 01, 2012 8:05 pm

Could have deleted the preferences file, and it would have fixed many problems: the script editor not working because "strict compilation mode" was checked, the start center being closed, and the Resources being out of sight. I still don't know why it could not find the handler, or if that is changed by a preference somewhere.

Post Reply