Difference between revisions of "SCI Kernel Documentation/Debugging Functions"

From SCI Wiki
Jump to navigationJump to search
Line 43: Line 43:
  
 
<blockquote>
 
<blockquote>
{|
+
{| valign="top"
 
|width= "100"|&lt;shft&gt;&lt;shft&gt;-Z||Put the debugging window away. This also can be used to pop the debugging window up while the program is running.
 
|width= "100"|&lt;shft&gt;&lt;shft&gt;-Z||Put the debugging window away. This also can be used to pop the debugging window up while the program is running.
 
|-
 
|-

Revision as of 14:43, 3 December 2015

Official SCI Documentation

Chapter: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Index


Debugging Functions

Author: Jeff Stephenson

Revision by: David Slayback

 


Debugging Functions

There a number of functions designed for debugging Script programs by providing information about the state of the program.


(SetDebug)

Pop up the debugging window. At the top of the window, in red, is the name (if any) of the object self. Below it is the op-code about to be executed. In columns on the right side of the window are the top five values on the stack and the top five parameters. On the left are the contents of the accumulator (acc), the address of the next instruction (the instruction pointer, or ip), and the address of the top of the stack (the stack pointer, or sp).

A number of instructions may be issued while in the debugger (Note that the debugger is case-sensitive, ie. Q != q):

<shft><shft>-Z Put the debugging window away. This also can be used to pop the debugging window up while the program is running.
q Quit. Exit to DOS. Using <shft><shft>- to pop up the debugger and q to quit will generally get you out of the program even if your code is broken.
s Toggle the send stack on/off.
Enter Step to the next instruction, tracing into the procedure or method referenced by a call or send instruction.
Tab Step to the next instruction treating a call or a send as an indivisible instruction (don't trace into them).
tn Display the value of temporary variable number n.
ln Display the value of local variable number n.
gn Display the value of global variable number n.
i Open an inspector window, allowing you to inspect the values of the properties of objects. See InspectObj below.
o Look at all objects.
O Look at all objects with their hex addresses given. The actual address to inspect is <addr>+$0006.
a Look at object in the accumulator.
c Look at current object on top of send stack.





 

Notes


 

Table of Contents

 

< Previous: File Functions Next: Index >