Register to post in forums, or Log in to your existing account
 

 Related 
Contents
Feature Reference
  Aliases
  Macros
  Variables
  Functions
  Classes
  Triggers
  Buttons
  Gauges
  Paths
  Menus
  Events
  Modules
  Windows
  Packages
  Shared Package Library
  Package Editor
  Docked Windows
  Customizeable Toolbars
  Sessions
  Expressions
  Automapper Module
  Database Module
  Syntax Checking
  Tab Completion
  Status items
  Preferences
  Simutronics Support
  Pueblo Emulation
  Keyboard shortcuts
  MXP
  Threads
  ATCP
  Script Debugger
  Timestamps
  Lua Scripting
Related Links:
  New Features
Script Debugger [[cmud_debugger]] 
Added in v2.11
The Script Debugger window can be opened using the Window/Script Debugger menu command, or by typing the #DEBUG command on the command line.

The Script Debugger can display messages when various events occur within CMUD. For example, the debugger can display a message when one of your triggers fires, along with the text that caused it to fire.

The debugger can be very useful for tracking down problems with your scripts. Here are the messages that can be displayed by the debugger:
a) Show Session text
displays each text line received from each window. The color from the MUD is preserved in the debugger output
b) Show #debug messages
The #DEBUG command can be used to send user-defined messages to the debugger.
c) Show thread start
Displays a message when a new script thread is created, or when a new script is executed
d) Show thread end
Displays a message when a script thread is suspended, stopped, or terminated.
e) Show thread resume
Displays a message when a thread is resumed, such as a #WAITFOR receiving the pattern it was waiting for.
f) Show triggers
Displays triggers when they are fired. If the trigger contains any %1..%99 references, the values of these variables are also shown
g) Show output line changes
Shows any changes made to the current line using commands like #CW or #SUB. This allows you to track the original text received from the MUD along with any changes made to it by your scripts
h) Show ANSI codes
Show the raw ANSI codes for the text received from windows. This is the ANSI text that ANSI Triggers are fired upon.
i) Show raw session input/output
Shows the raw data received and sent to the MUD. This is the same as the data written to files using the #DEBUGFILE command.
j) Show text sent to session
Shows commands send to the MUD, including command line text and text sent with the #SEND command.
k) Show variable change
Shows a message when any variable (or other setting) changes value.
l) Show when settings compile
Displays a message when a setting is compiled. This can be used to see if your settings are getting recompiled needlessly for performance improvements.

The Debugger window

The debugger can be enabled or disabled with the checkbox in the main toolbar at the top of the window. Messages are only displayed in the debugger when it is enabled. Note that your scripts will run slower when the debugger is enabled (it takes time to display the debugger messages).

The Save button in the toobar can be used to save the text of the debugger to a file. You can also copy/paste information from the debugger window as needed. The Clear button will clear the window, and the Add Separator button will add a --- horizontal rule to the window. Horizontal rules are also added automatically whenever a new command is entered into the CMUD command line and executed.

A Class Tree can be viewed to the left of the main debugger window. This can be used to enable and disable which windows, modules, and classes are debugged. This class tree is not updated automatically as classes are added or removed, so click the Refresh Class Tree button at the bottom of the window to reload your list of classes if necessary.
Viewer Comments [0 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net