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.…')
 
m (Conversion script moved page Debugging to debugging: Converting page titles to lowercase)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==About the bebugging system==
==About the debug 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 debug system that seeks to display more information, mainly aimed at developers.


==Stack trace==
==Stack trace==
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:
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]]
Line 55: Line 55:
* [[debugPacket_include_dumpMethod]]
* [[debugPacket_include_dumpMethod]]
* [[debugDomains]]
* [[debugDomains]]
[[Category:Debug]]

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.

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: