Debugging console

Overview

The debugging console combines the cmd line brought up by the <tab> key with an on-screen log,
that shows past commands and log messages. It now supports a command line history, scrollback support,
variable inspection, and logging everything to a file.

How to use

All you need to do is add an include <console.wdl>; to your code. If you want to modify how the console
works, the following thinsg can be changed, without having to resort to modifying the console.wdl directly.

To change the font colors used ( when using TTF's which is the default ):

define CON_COLOR_RED 0; // Change this to your RED color value
define CON_COLOR_BLUE 0; // Change this to your BLUE color value
define CON_COLOR_GREEN 0; // Change this to your GREEN color value
include <console.wdl>; // Then include the wdl after you've defined the changes

To change the font being used:

define CON_FONT_REDEFINED; // This is to let console.wdl know that you defined the font
font con_font = "Courier",0,14; // Use whatever font definition you want, but it has to be called con_font
include <console.wdl>; // Then include the wdl after you've defined the changes

To change the logging properties:

define CON_LOG_ENABLE 0; // This turns off file logging, use a 1 to enable it (default)
define CON_LOGNAME_REDEFINED; // This is to let console.wdl know that you defined the logname
string CON_LOGNAME = "debuglog.txt"; // Change "debuglog.txt" to what file you want to log to
include <console.wdl>; // Then include the wdl after you've defined the changes

To change the scrollback:

define CON_SCROLL 10; // This is how many lines of text to scroll forward and back using PG_UP/DOWN
include <console.wdl>;

Todo List

I originally wanted to add functions to allow you to add printf style log messages to your
code, using a syntax like:

con_printf("Event %t for entity %e", event_type, my);

And have the console log show:

Event EVENT_IMPACT for entity my_entity_name_from_wed.

Unfortunatly the string routines are very tedious to work with when it comes to parsing, so
this is left on the todo list for now. It maybe easier to make this whole thing into a DLL for
both speed and flexibility.

Known Bugs

None

Change Log

1.0 beta
Added command line history.
Added scrollback support.
Added file logging.
Fixed resizing bug.
Added configurable options.
0.1
Initial release.


Download the current debugging console from here.

Send bugs/comments to:

    qwerty823 on the 3DGS Forum ( faster response, preferred method )
    dem AT chaostech DOT com. ( slower response )