home

about

team

projects

papers

downloads

manual

messageboard

FlexDebug

A system to dynamically load custom debugging modules for FlexBot at run-time.


Summary

A powerful debugging system can be an essential element in the process of developing a FlexBot behavior. In the early pre-release versions of FlexBot, all debugging functionality was hard-coded into the FlexBot system. While this design provided some basic debugging capabilities, it limited the bot developer to using the provided debugging application. Additional debugger features often required modification of the FlexBot source code, forcing the developer to work with a non-standard build of the FlexBot system that was not easily upgradeable. The debugging system was platform-dependent and modification of the Windows-based debugger required knowledge of Win32 API programming techniques.

FlexDebug provides a framework for the user to create custom debugger modules that can be loaded by FlexBot at run-time. Any number of FlexDebug modules may be loaded simultaneously and all modules run in parallel. When a debugging message is passed from a bot behavior to FlexBot, FlexDebug ensures that the debugging message is given to every loaded FlexDebug module. Because modules are compiled into DLL's, their implementation is language-independent. FlexDebug modules are simple to develop because they can easily be compiled in Microsoft Visual Studio using the provided template code.


Control Flow


Details

  • The FlexDebug architecture is built into the FlexBot Beta 1 release.
  • FlexDebug modules are compiled into DLL's.
  • C++ template code provides the framework for creating a simple module.
  • Compiled FlexDebug module DLL's are placed in the FlexBot/dlls/FlexDebug/ directory. All modules in this directory are loaded by FlexBot at run-time.
  • Modules can be easily distributed for use by other users without recompiling or reconfiguring any parts of the system. The module will work on a different FlexBot-equipped machine as soon as the user drops the file into the appropriate directory.
  • A simple FlexDebug module can be written in C with less than 30 lines of code (including provided skeleton code).
  • There is no limit to the number of FlexDebug modules that may be running concurrently.

Existing FlexDebug Modules

BotWatch
The original debugger for FlexBot, BotWatch, has been removed from the central FlexBot build and repackaged as a FlexDebug module. BotWatch uses Windows Messages to send debugging information to a Win32 GUI application. Features include support for viewing multiple bots' debugging values simultaneously and a "watch" feature that pauses the game when a variable changes values.
[ Source Code | Download ]

UDP Debugger
The UDP Debugger acts as a UDP server, allowing up to 10 remote clients to connect. Connected clients are sent real-time debugging information. Features include support for both Linux and Windows versions of FlexBot.
[ not yet available ]

SimpleLog
The SimpleLog module simply appends every debug signal received to a logfile. This simple example of how to use FlexDebug was written in less than 30 lines of code.
[ not yet available ]

ConsolePrint
The ConsolePrint module spawns an external console window and continuously prints debug signals to the screen.
[ not yet available ]

  gdunham@northwestern.edu