UnrealScript Debugger Users Manual
Last updated by Michiel Hendriks, completed more of the documentation. Previous update by Vito Miliano (UdnStaff), for tweaks and corrections. Original author was Albert Reed (DemiurgeStudios?).
Before firing up the debugger for the first time, you need to create a debug build of your UnrealScript packages. To do this, delete all the
files in your
directory and run the UnrealScript compiler with the
switch. To do this, type
ucc make -debug
at the command line.
With the debug
files compiled, run
directory to begin debugging your game or application. It is highly recommended you configure your game to run in windowed mode by setting
The fundamentals of the UnrealScript debugger closely resemble those of Developer Studio. In order to begin debugging a block of code, find the class you would like to edit from the class Hierarchy in the left pane and double-click on it. This will open the source in the main window of the debugger. Locate the block of code you would like to debug and click in the gutter to the left of the line numbers (or press F9 on the selected line). A red Stop-Sign will appear and the next time that code executes the debugger will pause execution of your program and bring the debugger to the foreground.
Once paused a green arrow will appear in the left gutter to mark where the debugger has currently paused execution. From here you can walk through your code by using the items in the "Execution" menu at the top of the debugger. Alternatively you can use the hotkeys (same as dev-studio) or the buttons on the top toolbar (F5 = continue; F10 = jump over; F11 = trace into; Shift+F11 = jump out of).
- Class tree; by default it only shows the actors, uncheck (6) to use Object as root
- Source code; shows the source code of the class currently being debugged. Break points and the current execution line are highlighted (in red and aqua respectively).
- Information Tabs shows various details about the current debug process.
- Call stack
- Toolbar buttons
- Set\unset the root of the class tree to actor.
- Stop debugging; stop the application
- Continue (F5)
- Trace in to ... (F11)
- Jump over... (F10)
- Jump out of... (Shift+F11)
- Show actor list; doesn't do anything
- Break; pause the current program execution
- Toggle breakpoint (F9); toggle a breakpoint on the current source line
- Clear all breakpoints; removes all breakpoints
- Break on Access None (Ctrl+Alt+N); automatically break when accessing a
- Add Watch...; add a watch contidion
- Remove Watch...; remove the currently selected watch
- Clear all watches; removes all watches
- Find (Ctrl+F); search text in the currently opened file
- Find Next (F3); find the next occurance of the search string.
The bottom of the debugger has five tabs which give you information about the current state of execution.
This tab lists all of the variables that are declared within the current function and their value. For pointers and structs a the plus icon next to the variable name will expand that variable into it's members.
This tab lists all the variables that are defined in the class the debugger is currently paused in. It lists them in the same format as described above in Local Variables.
Watches make it possible for you to provide specific variables that are either class-wide or function-wide in scope. It is most useful for narrowing down the huge list of global variables. To add a variable to this list pull down the "watches" menu at the top of the debugger and select "add watch". Type in the name of the variable you would like to watch and press okay. In order for this window to refresh you will need to step forward in the code.
From this tab you edit and view the current breakpoints. Double-clicking on a breakpoint will take you to that line in the code. Right-clicking on the breakpoint listing in this tab will bring up a menu to remove the breakpoint.
This tab is the same as the
file and the display typing at the console gives. It provides messages, warnings and errors that have occurred during execution.
- Setting breakpoints on lines of code that do not execute will not cause the debugger to break. This means that setting a breakpoint on blank lines, comments and variable declarations will not cause the debugger to pause there under any circumstances.
- Breakpoints may be configured outside of the debugger by editing the
UDebugger.ini file in your
This pane lists what functions have been called in order to reach the current point in execution. Ofcourse only UnrealScript functions are listed and not the native function that initially called function.
Break On Access None
When this option is enabled (
Breakpoints->Break on access none or Ctrl+Alt+N) the debugger will break when the engine tried to read from a variable that has been set to
You can pause the execution at any time by pressing the break button. The current script that was running will then be opened and set to the current line that is being executed. From here on you can continue normal debugging.
Continue execution. (F5)
Pause the execution
Trace into the current function. (F11)
Jump over (F10)
Exit the current debug level to the calling function. (Shift+F11)
Shows a broken call stack window. Use the call stack next to the class tree.
Search field (Ctrl+F) and search next (F3). This will search in the currently opened file.
Jump to the current line of execution.
Not Yet Documented
- Performance Issues
- Coming in Debugger 3.0