debugging: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==About the | ==About the debug system== | ||
Since SolosKore (fork of Kore who originated the OpenKore), there | Since SolosKore (fork of Kore who originated the OpenKore), there debug system that seeks to display more information, mainly aimed at developers. | ||
==Stack trace== | ==Stack trace== | ||
Line 45: | Line 45: | ||
==Settings display to debug== | ==Settings display to debug== | ||
The following settings are located in [[config.txt]] and interact with the display of debug information: | The following settings are located in [[:Category:config.txt|config.txt]] and interact with the display of debug information: | ||
* [[debug]] | * [[debug]] | ||
* [[debugPacket_unparsed]] | * [[debugPacket_unparsed]] |
Latest revision as of 22:35, 26 April 2021
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: