Difference between revisions of "Director"

Jump to navigation Jump to search
3,909 bytes added ,  01:07, 16 December 2023
Updated engine authors, added debugger commands
(Add information about compiling director with `--enable-asan`. The buildbot will error when finding a memory leak.)
(Updated engine authors, added debugger commands)
 
Line 1: Line 1:
{{EngineDescription|
{{EngineDescription|
name=director|
name=director|
         developer=[[User:sev|sev]], [[User:iskrich|iskrich]], [[User:djsrv|djsrv]], [[User:npjg|npjg]], [[User:Mstea|mstea]]|
         developer=[[User:sev|sev]], [[User:iskrich|iskrich]], [[User:djsrv|djsrv]], [[User:npjg|npjg]], [[User:Mstea|mstea]], [[User:moralrecordings|moralrecordings]]|
companies=[[Macromedia]]|
companies=[[Macromedia]]|
usedBy=[[Director/Games|hundreds of games]]|
usedBy=[[Director/Games|hundreds of games]]|
Line 72: Line 72:
The useful ones are:
The useful ones are:


* lingoexec -- tracing Lingo execution
* lingoexec -- tracing Lingo execution. There are varying levels of verbosity, --debuglevel=5 is probably the best for showing every instruction as it is executed.
* lingocompile -- details about Lingo script compilation
* lingocompile -- details about Lingo script compilation
* lingoparse -- turns on Bison grammar trace. Verbose. You should know what you're doing
* lingoparse -- turns on Bison grammar trace. Verbose. You should know what you're doing
*lingostrict -- drop to the debugger if we hit a Lingo exception. This is a condition which would cause an interrupting error in the Macromedia Director editor; the player will just abort the script.
* compileonly -- useful with test targets when we load all files in the directory. This is how we created that status table of Lingo Workshop movies
* compileonly -- useful with test targets when we load all files in the directory. This is how we created that status table of Lingo Workshop movies
* slow -- add 2s delay between every frame. Useful at higher debug levels, so you could see what is going on instead of munching megabytes of logs
* slow -- add 2s delay between every frame. Useful at higher debug levels, so you could see what is going on instead of munching megabytes of logs
Line 80: Line 81:
* bytecode -- execute precompiled bytecode instead of compiling Lingo. Lingo Workshop movies have both bytecode and script texts
* bytecode -- execute precompiled bytecode instead of compiling Lingo. Lingo Workshop movies have both bytecode and script texts
* loading -- produces tons of deciphered data from movie files.
* loading -- produces tons of deciphered data from movie files.
*sound -- log engine calls related to sound
*xobj -- log engine calls to third-party XLibs


=== Compilation ===
=== Compilation ===
Line 98: Line 101:


== Debugger Commands ==
== Debugger Commands ==
To open the [[Debugging ScummVM|interactive debugger console]] press the key combination that is set for "Open Debugger" in the "Keymaps" tab from ScummVM options (default should be Ctrl+Alt+d).
To open the [[Debugging ScummVM|interactive debugger console]] press the key combination that is set for "Open Debugger" in the "Keymaps" tab from ScummVM options (default should be Ctrl+Alt+d).<syntaxhighlight lang="text">
Debug flags
-----------
debugflag_list - Lists the available debug flags and their status
debugflag_enable - Enables a debug flag
debugflag_disable - Disables a debug flag
debuglevel - Shows or sets debug level
 
Commands
--------
Player:
version - Shows the Director version
info - Shows information about the current movie
movie / m [moviePath] - Get or sets the current movie
frame / f [frameNum] - Gets or sets the current score frame
channels / chan [frameNum] - Shows channel information for a score frame
cast [castNum] - Shows the cast list or castNum for the current movie
nextframe / nf [n] - Steps forward one or more score frames
nextmovie / nm - Steps forward until the next change of movie
 
Lingo execution:
print / p [statement] - Evaluates a single Lingo statement
repl - Switches to a REPL interface for evaluating Lingo statements
backtrace / bt - Prints a backtrace of all stack frames
disasm / da [scriptId:funcName] - Lists the bytecode disassembly for a script function
disasm / da all - Lists the bytecode disassembly for all available script functions
stack / st - Lists the elements on the stack
scriptframe / sf - Prints the current script frame
funcs - Lists all of the functions available in the current script frame
var / v - Lists all of the variables available in the current script frame
markers / mk - Lists all of the frame markers in the current score
step / s [n] - Steps forward one or more operations
next / n [n] - Steps forward one or more operations, skips over calls
finish / fin - Steps until the current stack frame returns
continue / c - Continues execution
 
Breakpoints:
bpset / b - Creates a breakpoint at the current Lingo function and offset
bpset / b [funcName] - Creates a breakpoint on a Lingo function matching a name
bpset / b [offset] - Creates a breakpoint on the current Lingo function matching an offset
bpset / b [funcName] [offset] - Creates a breakpoint on a Lingo function matching a name and offset
bpset / b [scriptId:funcName] - Creates a breakpoint on a Lingo function matching a script ID and name
bpset / b [scriptId:funcName] [offset] - Creates a breakpoint on a Lingo function matching a script ID, name and offset
bpmovie / bm [moviePath] - Create a breakpoint on a switch to a movie
bpframe / bf [frameId] - Create a breakpoint on a frame in the score
bpframe / bf [moviePath] [frameId] - Create a breakpoint on a frame in the score of a specific movie
bpentity / be [entityName] - Create a breakpoint on a Lingo "the" entity being read or modified
bpentity / be [entityName] [r/w/rw] - Create a breakpoint on a Lingo "the" entity being accessed in a specific way
bpentity / be [entityName:fieldName] - Create a breakpoint on a Lingo "the" field being read or modified
bpentity / be [entityName:fieldName] [r/w/rw] - Create a breakpoint on a Lingo "the" field being accessed in a specific way
bpvar / bv [varName] - Create a breakpoint on a Lingo variable being read or modified
bpvar / bv [varName] [r/w/rw] - Create a breakpoint on a Lingo variable being accessed in a specific way
bpevent / bn [eventName] - Create a breakpoint on a Lingo event
bpdel [n] - Deletes a specific breakpoint
bpenable [n] - Enables a specific breakpoint
bpdisable [n] - Disables a specific breakpoint
bplist - Lists all breakpoints
 
GFX:
draw [cast|frame|off] - Draws debug outlines for cast or frame number
</syntaxhighlight>


=== lingo ===
=== lingo ===

Navigation menu