debugging
Jump to navigation
Jump to search
About the debug system
Since SolosKore (fork of Kore who originated the OpenKore), there debug 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.
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: