 |
View previous topic :: View next topic |
 |
|
|
|
|
Author |
Message |
|
|
|
|
|
Carl Sumner
Joined: 23 Feb 2004 Posts: 4950 on topic Location: Amherst, VA, USA

 |
Posted: Thu, 21. Oct 04, 06:27 Post subject: Script Debugger |
|
|
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.
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.
Please post here if you have any corrections or additional info. 
_________________ 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 |
|
|
|
 |
|
|
|
|
|
Burianek

Joined: 29 Dec 2003 Posts: 2925 on topic Location: Chicago, IL

|
Posted: Thu, 21. Oct 04, 06:33 Post subject: |
|
|
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 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 |
|
|
|
 |
|
|
|
|
|
Carl Sumner
Joined: 23 Feb 2004 Posts: 4950 on topic Location: Amherst, VA, USA

|
Posted: Thu, 21. Oct 04, 06:47 Post subject: |
|
|
| 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 so that as info is added here I can reference it from the sticky.
*nudges ticaki* |
Any additional info greatly appreciated. 
_________________ Tinker
"If engineers built buildings the way programmers write programs, the first woodpecker that came along would destroy civilization!" |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Kailric

Joined: 07 Dec 2003 Posts: 977 on topic Location: USA

|
Posted: Thu, 21. Oct 04, 06:58 Post subject: |
|
|
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 |
|
|
|
 |
|
|
|
|
|
Carl Sumner
Joined: 23 Feb 2004 Posts: 4950 on topic Location: Amherst, VA, USA

|
Posted: Thu, 21. Oct 04, 07:37 Post subject: |
|
|
| 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... 
_________________ Tinker
"If engineers built buildings the way programmers write programs, the first woodpecker that came along would destroy civilization!" |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Xenon_Slayer EGOSOFT

Joined: 09 Nov 2002 Posts: 9529 on topic Location: Ego HQ, Germany (Originally England)

|
Posted: Thu, 21. Oct 04, 09:42 Post subject: |
|
|
Is this log in the main player log?
_________________
Annoying BurnIt! since 2008... |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Kailric

Joined: 07 Dec 2003 Posts: 977 on topic Location: USA

|
Posted: Thu, 21. Oct 04, 15:05 Post subject: |
|
|
| 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 |
|
|
|
 |
|
|
|
|
|
Xenon_Slayer EGOSOFT

Joined: 09 Nov 2002 Posts: 9529 on topic Location: Ego HQ, Germany (Originally England)

|
Posted: Thu, 21. Oct 04, 15:17 Post subject: |
|
|
No. Where do you view the logs?
_________________
Annoying BurnIt! since 2008... |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Kailric

Joined: 07 Dec 2003 Posts: 977 on topic Location: USA

|
Posted: Thu, 21. Oct 04, 16:45 Post subject: |
|
|
| 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 |
|
|
|
 |
|
|
|
|
|
ticaki
Joined: 06 Nov 2002 Posts: 4585 on topic Location: Idar-Oberstein

|
Posted: Thu, 21. Oct 04, 16:55 Post subject: |
|
|
| 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 |
|
|
|
 |
|
|
|
|
|
|
|