debugging: Difference between revisions

From OpenKore Wiki
Jump to navigation Jump to search
(Created page with '==About the bebugging system== Since SolosKore (fork of Kore who originated the OpenKore), there debbug system that seeks to display more information, mainly aimed at developers.…')
 
No edit summary
Line 1: Line 1:
==About the bebugging system==
==About the debbug system==
Since SolosKore (fork of Kore who originated the OpenKore), there debbug system that seeks to display more information, mainly aimed at developers.
Since SolosKore (fork of Kore who originated the OpenKore), there debbug system that seeks to display more information, mainly aimed at developers.


Line 8: Line 8:


==Code to write a new debug message==
==Code to write a new debug message==
To create a message that will be displayed only with debug mode on, use the command '''debug'''.
To create a message that will be displayed only with [[debug]] mode on, use the command '''debug'''.


Syntax:
Syntax:

Revision as of 23:41, 13 February 2013

About the debbug system

Since SolosKore (fork of Kore who originated the OpenKore), there debbug system that seeks to display more information, mainly aimed at developers.

Stack trace

In ErrorHandler file, to which is used to generate the file errors.txt when a critical error occurs during the execution of OpenKore, has the stack trace, a system that collects the latest calls routines in the last loop.

See more here.

Code to write a new debug message

To create a message that will be displayed only with debug mode on, use the command debug.

Syntax:

debug(message, [domain], [level])
Argument Description
message The message you want to print.
domain The message domain (context). This is used to classify a message. See more below.
level The message's verbosity level. The message will only be printed if this number is lower than or equal to $config{'verbose'} (or $config{'debug'} if this is a debug message). Important messages should have a low verbosity level, unimportant/redundant messages should have a high verbosity level.

Debug domains

Recommend that you only use one of the following domains:

  • ai_attack
  • ai_autoCart
  • ai_move
  • parseInput
  • parseMsg
  • parseMsg_damage
  • parseMsg_presence
  • portalRecord
  • sendPacket
  • ai
  • npc
  • route
  • useTeleport

Settings display to debug

The following settings are located in config.txt and interact with the display of debug information: