EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
Script Debugger
Post new topic Reply to topic
View previous topic :: View next topic
Author Message
Carl Sumner





Joined: 23 Feb 2004
Posts: 4945 on topic
Location: Amherst, VA, USA
Thank you for registering your game
modified
PostPosted: Thu, 21. Oct 04, 06:27    Post subject: Script Debugger Reply with quote Print

I haven't found any info on the debugger section of the script editor. So here is what I think I've learned so far. Wink

Edit 21 Oct 2004: Added info. Thanks Kailric, ticaki and Burianek.


To access the Script Debugger go to any of your ships Command menu and press "s" for the script editor. The name of the ship you'r debugging will be listed as "Script Debugging:Your Argon Nova".

The Script Debugger has two modes. Log and Trace. Press enter on this command to change it. The command to Clear the Log also sets the mode back to off. The Debug Menu shows the logged lines and is different in Log mode than in Trace mode.

While in the script editor command menu, highlight "Script Debug Menu" and press Enter. You must have the command set to Log, or Trace, for this to show any logs.

Lines that are skipped are not shown. Encrypted scripts and internal routines do not show their lines, instead the log pauses until the routine is finished. If a command such as "follow" or "fly to sector" has been called then this can be a long time.

1. The Log mode stores the lines as they are executed but does not noticably slow down the script. Values of variables are not shown.

You can scroll up and down with the PgUp and PgDn keys or the up and down arrow keys. The newest lines are at the bottom.

The log starts when you set the mode to Log but stays until you use the Clear Log command to erase it. It can get quite long. The log is separate for each object.

2. The Trace mode shows the line executing (and the previous ones) but waits for an Enter keypress before it continues to the next line. If you do not press Enter, that ship will freeze when the current line finishes, but other ships do not. You can scroll up and down in the line list with the PgUp and PgDn keys. The newest line is at the bottom. It is highlited.

When each line completes, the display will show the associated variable values in the lower pane. You can scroll up and down in the data list with the up and down arrow keys. Only local data is shown.

Be sure to Clear the degug log and set the mode to off when you are done. If the logging is left on it can slow the game and increase the save game size.

There does not appear to be a Breakpoint command. I did not see any way to view Global variables or Object properties.

Using the debug mode is much better than putting print lines in the code to see what is going on. You would be amazed what you can see about your scripts. Wink


Please post here if you have any corrections or additional info. Smile


_________________
Tinker

"If engineers built buildings the way programmers write programs, the first woodpecker that came along would destroy civilization!"


Last edited by Carl Sumner on Thu, 21. Oct 04, 20:25; edited 1 time in total
Back to top
View user's profile Send private message
Burianek





Joined: 29 Dec 2003
Posts: 2925 on topic
Location: Chicago, IL
Thank you for registering your game
PostPosted: Thu, 21. Oct 04, 06:33    Post subject: Reply with quote Print

Sweet. Thanks.
I've been doing all of my stuff the hard way to date.
Maybe I'll break down and make things easier on myself now.
Cheers.

I'm certain if ticaki already knows anything about this, he'll be willing to enlighten the ignorant americans Very Happy so that as info is added here I can reference it from the sticky.

*nudges ticaki*


_________________
"Nature's first green is gold" . . . stay golden.
Join the Guild Wars: X Universe Guild!
Back to top
View user's profile Send private message Visit poster's website
Carl Sumner





Joined: 23 Feb 2004
Posts: 4945 on topic
Location: Amherst, VA, USA
Thank you for registering your game
PostPosted: Thu, 21. Oct 04, 06:47    Post subject: Reply with quote Print

Burianek wrote:
Sweet. Thanks.
I've been doing all of my stuff the hard way to date.
Maybe I'll break down and make things easier on myself now.
Cheers.

I'm certain if ticaki already knows anything about this, he'll be willing to enlighten the ignorant americans Very Happy so that as info is added here I can reference it from the sticky.

*nudges ticaki*


Any additional info greatly appreciated. Very Happy


_________________
Tinker

"If engineers built buildings the way programmers write programs, the first woodpecker that came along would destroy civilization!"
Back to top
View user's profile Send private message
Kailric





Joined: 07 Dec 2003
Posts: 977 on topic
Location: USA
Thank you for registering your game
PostPosted: Thu, 21. Oct 04, 06:58    Post subject: Reply with quote Print

Just don't forget to turn off logging when your done testing cause all that text can bring your pc to a snails crawl if you should check the log..say 5 minutes or more after you started logging.


_________________
"Try not. Do or do not, there is no try."-Yoda

"[Its] time for the human race to enter the solar system"-Dan Quayle
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Carl Sumner





Joined: 23 Feb 2004
Posts: 4945 on topic
Location: Amherst, VA, USA
Thank you for registering your game
PostPosted: Thu, 21. Oct 04, 07:37    Post subject: Reply with quote Print

Kailric wrote:
Just don't forget to turn off logging when your done testing cause all that text can bring your pc to a snails crawl if you should check the log..say 5 minutes or more after you started logging.


Good point... Wink


_________________
Tinker

"If engineers built buildings the way programmers write programs, the first woodpecker that came along would destroy civilization!"
Back to top
View user's profile Send private message
Xenon_Slayer
EGOSOFT
EGOSOFT



Joined: 09 Nov 2002
Posts: 9521 on topic
Location: Ego HQ, Germany (Originally England)
Thank you for registering your game
PostPosted: Thu, 21. Oct 04, 09:42    Post subject: Reply with quote Print

Is this log in the main player log?


_________________

Annoying BurnIt! since 2008...
Back to top
View user's profile Send private message Send e-mail
Kailric





Joined: 07 Dec 2003
Posts: 977 on topic
Location: USA
Thank you for registering your game
PostPosted: Thu, 21. Oct 04, 15:05    Post subject: Reply with quote Print

Xenon_Slayer wrote:
Is this log in the main player log?


No, its in the "script debug menu"... to access the menu go to any of your ships command menu and press "s" for the script editor. The name of the ship your debugging will be listed as Script Debugging:Your Argon Nova

Then you can use the other tasks that Carl mentioned....


_________________
"Try not. Do or do not, there is no try."-Yoda

"[Its] time for the human race to enter the solar system"-Dan Quayle
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Xenon_Slayer
EGOSOFT
EGOSOFT



Joined: 09 Nov 2002
Posts: 9521 on topic
Location: Ego HQ, Germany (Originally England)
Thank you for registering your game
PostPosted: Thu, 21. Oct 04, 15:17    Post subject: Reply with quote Print

No. Where do you view the logs?


_________________

Annoying BurnIt! since 2008...
Back to top
View user's profile Send private message Send e-mail
Kailric





Joined: 07 Dec 2003
Posts: 977 on topic
Location: USA
Thank you for registering your game
PostPosted: Thu, 21. Oct 04, 16:45    Post subject: Reply with quote Print

Xenon_Slayer wrote:
No. Where do you view the logs?


while in the script editor command menu, Highlight "script debug menu" and press enter. You must have the command set to log, or trace for this to show any logs


_________________
"Try not. Do or do not, there is no try."-Yoda

"[Its] time for the human race to enter the solar system"-Dan Quayle
Back to top
View user's profile Send private message Send e-mail MSN Messenger
ticaki





Joined: 06 Nov 2002
Posts: 4585 on topic
Location: Idar-Oberstein
Thank you for registering your game
PostPosted: Thu, 21. Oct 04, 16:55    Post subject: Reply with quote Print

Kailric wrote:
Just don't forget to turn off logging when your done testing cause all that text can bring your pc to a snails crawl if you should check the log..say 5 minutes or more after you started logging.


a very wise point... one time i forgotten to stop the logging... it result in a 15,03 MB Savegame... and a check over all freighters which one do it...

Greets ticaki


_________________
Zur Zeit nicht aktiv
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic Reply to topic
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Control Panel
Login Data
The time now is Fri, 24. May 13, 18:23

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2009
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.15747 seconds, sql queries = 55