Using the Debugger
The debug window is opened from the ADRIFT runner by selecting View/Debugger from the menu.
On the left is a tree-view that shows all of the items present in the game being played. At the top are controls that let you choose the level of detail to show in the log window, and whether or not to show the time it takes to execute each command. Below that is a large text pane where the debug log messages will be displayed.
The tick next to the item types in the tree-view allow you to limit the log messages so that only those that are relevent to the selected item types are displayed. By clicking on the + icon next to the item type you can display a complete list of all of the items of that type that exist in the current game. Each of these also has a tick next to it, so you could turn off log messages for all objects and then re-enable them for one or two particular objects.
If you click on the name of a variable in the tree-view, then the debugger will display the current value of that variable at the bottom of the tree-view pane.
This value is editable, so if you type a new value into this box then the value of the variable in the game is instantly changed.
For integer variables you must type a number, but for text variables you can enter anything.
This allows you to change any of the variables in the game as you play it. For example, if the game chooses a random value for a variable, but you want to test what happens with a particular value, then you can just type it in.
If you click on an event in the tree-view, then the current status of that event (Counting down, Finished, Not yet started, Paused or Running) will be displayed below the tree-view.
Below that is the current tick-count of the timer.
The task list always shows specific tasks nested below the general tasks that they override.
If you click on one of the tasks in this list then the debugger will display whether this task has been completed or not, and whether this task has ever altered the value of the SCORE variable.
This can be changed manually, so you can reset a task that has already been completed, allowing you to execute that task again.
Locations always have a "Seen" property that indicates whether the player has ever seen this particular location.
Any location properties that you create yourself will be added to the list. The "Visited" property shown above is one of these.
Objects usually have lots of properties, those shown here are the standard ones for a dynamic object at a location.
The first property shown here is a text property, while the others are all state properties.
The log window
When you first open the debugger the log window will be blank, as messages are only written to the log after it has been opened. To examine what ADRIFT is doing at a certain part of your game, you should first play the game up to the point you want to examine, open the debugger, then enter the commands you want to examine before returning to the debug window to see the output.
Likewise, the detail setting must be set before you execute the commands to be examined. If you have the debugger set to low detail then you can't just switch to high detail to view the extra information, you will need to re-play that section of the game to generate the log messages.
- The debugger displays a line of dots at the point at which it has stopped to wait for the player to enter a command.
- If you don't understand the debug messages and your game is not working how you expected at a certain point, then you can always copy and paste the debugger messages into a forum post so that someone else can examine it for you.
In the low detail mode you will only see brief messages about which task or event is being run.
The [00.12] at the beginning of each line is the amount of time that elapsed while ADRIFT was processing the command. It is unlikely you will ever need this, so just un-tick the "Show Times" box to hide it, as shown in the following examples.
More information is added, such as which task restrictions pass or fail.
The messages that would have been shown if you were in low-detail mode are shown in boldface.
More detailed information is added such as which step a walk is at or which turn an event is executing.
These high-detail additions are shown in italics, while medium detail messages are shown in normal type and low detail messages in boldface.
|<<< Macros||Main Page||Modules >>>|