Script Debugger

General discussion relating to everything 001 Game Creator.
Forum rules
The release date of the next version is completely unknown. Predictions are sometimes mentioned around the site, but they're always inaccurate. We're doing this for fun, so we enjoy not having deadlines.

Due to lack of time, feature requests and suggestions are currently not being taken by non-subscribers at this time.

Creating topics in this forum section has been disabled. If you would like to post questions concerning GG Maker, please post in the appropriate support forum.
User avatar
Mike
001 Co-Founder
 
Joined: Sun May 08, 2005 1:29 pm
Location: Ontario, Canada

Script Debugger

Postby Mike » Tue Apr 23, 2013 6:21 pm

Until now (for subscribers), whenever there was a problem with a script, all you would get is some text at the bottom declaring that you've made a mistake, and you'd be given some obscure text-based scripting, that to most, would mean very little.

Now, with the new script debugger feature, errors will bring up the following window. Subscribers will be the first to enjoy this new feature in beta.

debugger.png
Script Debugger


To explain a few of the important features:
Resume: This will attempt to resume the script. Doing this right away isn't quite useful. But with other debugger features, you could change some of your variables or switches, and it'll just go where it should've. Often, this will save you from having to restart from scratch.
Jump to Selected Node: This allows you to bypass nodes, or even go back to another node, in an attempt to rectify or skip a problem that you're having at the time.
Execute Node: These two buttons will simply execute a single node the engine is currently at. This allows you to essentially step through your script, node by node. The difference between the two is that one will enter sub scripts (including loops), while the other will not.
Cause Crash: Mostly for my needs, but others can use this to cause the game to crash and have the bug reporting window come up.
Toggle Breakpoint on Selected Node: This allows you to setup a break-point in your script. This is very useful so that you can restart the script/game and be able to step through to see exactly what's going on. You can do so in the editor as well, allowing you to be notified whenever the engine executes a script. Very useful!
Ignore Error: This will stop the script debugger from coming up for this error again for the duration of the test.
Abort Script: This is what used to happen by default, have it show the error at the bottom and leave the script immediately.

There's a few buttons there that I didn't bother to cover, that I'm sure you can guess what they do.

Below all the buttons is the error (or in this case, "Breakpoint", signifying that I setup a breakpoint earlier on and the engine is ready to let me decide what to do next.

And below that is local variables, and the "relate"/"this" stuff that we've all known to learn and love and hate.

You'll notice that the icons don't show up - this is for performance reasons only, so games don't load logner than they should.

I've been wanting to make this public for a long time, and I'm glad subscribers will finally be able to take advantage of this. Go grab the beta if you can :).

User avatar
kerub
Distinguished 001 Member
 
Joined: Fri Jun 01, 2012 8:20 am
Location: Germany

Re: AW: Script Debugger

Postby kerub » Wed Apr 24, 2013 4:20 pm

Now THIS is awesome! Thank you very much, this will be extremely useful!

User avatar
Mike
001 Co-Founder
 
Joined: Sun May 08, 2005 1:29 pm
Location: Ontario, Canada

Re: Script Debugger

Postby Mike » Thu Apr 25, 2013 1:09 pm

Glad someone liked this feature (over the icon rejoicing :P).

This feature is a huge help for me too - I can track what's going on from both scripting and engine at the same time. It used to be guesswork prior to this.

I hope to start seeing more complex scripts now that this feature exists.

User avatar
kerub
Distinguished 001 Member
 
Joined: Fri Jun 01, 2012 8:20 am
Location: Germany

Re: Script Debugger

Postby kerub » Fri Apr 26, 2013 11:25 am

I hope for less trial and error now that this feature is in :D


Since I haven't got the time to test out the new version atm, a quick question: Is it or will it be possible to change parameters right inside the script debugger while the game is still running? This would be extremely comfortable in means that you dont have to search the entry in the log file a dozen times and crawl back into the scripts to change parameters.
Last edited by kerub on Fri Apr 26, 2013 11:36 am, edited 1 time in total.
Reason: Automatically merged double post.

User avatar
Mike
001 Co-Founder
 
Joined: Sun May 08, 2005 1:29 pm
Location: Ontario, Canada

Re: Script Debugger

Postby Mike » Fri Apr 26, 2013 11:46 am

kerub wrote:Since I haven't got the time to test out the new version atm, a quick question: Is it or will it be possible to change parameters right inside the script debugger while the game is still running? This would be extremely comfortable in means that you dont have to search the entry in the log file a dozen times and crawl back into the scripts to change parameters.

You could have done this with a few versions back :). Anything is changeable in the debuggers (like screen information, variables, switches, tables, collections, etc...). The only exception is that new listing in this script debugger of local variables, which currently can't be changed, but it would be trivial to make it functional. Though, even when I make those changeable, things like Relate/This would remain unchangeable forever, just because of the way things are setup (and really, it wouldn't make sense to want to change those).

User avatar
kerub
Distinguished 001 Member
 
Joined: Fri Jun 01, 2012 8:20 am
Location: Germany

Re: Script Debugger

Postby kerub » Fri Apr 26, 2013 11:49 am

Mike wrote:things like Relate/This would remain unchangeable forever, just because of the way things are setup (and really, it wouldn't make sense to want to change those).

I was actually thinking about this in particular. For example a script errors with "Actor 0 is not valid" or "Relate can't be used on bla bla bla" I would be able to quickly change it and see if new parameter still errors, and so on, until the right parameter is set.

User avatar
Mike
001 Co-Founder
 
Joined: Sun May 08, 2005 1:29 pm
Location: Ontario, Canada

Re: Script Debugger

Postby Mike » Fri Apr 26, 2013 11:58 am

kerub wrote:"Actor 0 is not valid"

Changing this as part of a parameter would make sense.

kerub wrote:"Relate can't be used on bla bla bla"

This wouldn't make sense. It'd mean the script is being used in the wrong trigger altogether, and that a design decision would have to be made. Again, there'd be no benefit to altering these Relate/This's.

User avatar
kerub
Distinguished 001 Member
 
Joined: Fri Jun 01, 2012 8:20 am
Location: Germany

Re: Script Debugger

Postby kerub » Fri Apr 26, 2013 12:01 pm

That's true. Well then, I'm very happy that debugging is clearer now.

User avatar
Mike
001 Co-Founder
 
Joined: Sun May 08, 2005 1:29 pm
Location: Ontario, Canada

Re: Script Debugger

Postby Mike » Fri Apr 26, 2013 12:58 pm

Anyway, had nothing urgent to do this morning, so I made it possible for you to edit the parameters (for the case of custom events), and local variables :).

User avatar
Gamerdude
001 Support
 
Joined: Wed Dec 12, 2007 8:56 pm
Location: Australia

Re: Script Debugger

Postby Gamerdude » Fri Apr 26, 2013 1:00 pm

That's good to hear, I was thinking that would be handy too.
Image
Image

Next

Return to General 001 Discussion

Who is online

Users browsing this forum: No registered users

cron