Login
Remember
IF Answers
Ask a Question

# How do I debug in Quest?

0 votes
67 views
asked Mar 31 in Authoring by AndrewS (250 points)
edited Mar 31 by AndrewS

I'd be interested in reading about basic debugging techniques beyond just throwing in text you need to remove later so the player doesn't see it. Because debugging is one of those 5 dollar words that are not so bad once you know a few tricks.

Is there a parser command authors can use in a debug build? Is there something in Quest source that may say "print to debug" but not "print?"

- quest
- programming
- debugging

## 2 Answers

+2 votes
answered Apr 6 by jaynabonne (141 points)

There is a built-in Log command in Quest, which writes to a log separate from the normal text output the player sees. You can access the log by clicking the Log button or pressing F11 while playing a game. If you add this command to the "enter" script for a room:

    Log("Entered room")

then you will see this in the log:

> 06/04/2015 21:10:06 Entered room

The Debugger allows you to view objects, exits, command, turn script, etc along with all of their attributes, dynamically as the game progresses. It's handy especially if you're using a number of state variables (flags, etc.) and wish to see what the current state of them is. The only problem I have had with the debugger is that, with scripts touching a lot of objects and attributes, there can be a noticeable game slowdown if the Debugger window is open.

0 votes
answered Mar 31 by hegemonkhan (161 points)

I'm new to coding (been learning to code using quest), so I'm not that familiar with all the ways~tricks of debugging and etc, but quest does have a 'debugger' menu option (at the bar at the top during game play mode), but I've not played around with it, so I'm not sure what it does and doesn't do.

Others, who're more knowledgeable in coding will give a much better answer on what quest can do in debugging.

## Related questions

- How do I debug in Inform 7?
- How do I use the create exit command properly in Quest
- How do I find the default parser verbs in Quest?
- How do you center images in Quest?
- How can I make use of the health variable in Quest through the editor

...