Site Tools


debugging

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

debugging [2006/08/29 20:18] (current)
Line 1: Line 1:
 +======Debugging Scripts======
 +
 +Several tools exist in the client which can aid in debugging and testing
 +scripts.
 +
 +  * /[[set]] [[set debug|debug]] \\ Allows the client to show which commands are actually being executed, how they are being parsed, and what alias and variable substitutions are taking effect.
 +  * /​[[pretend]] \\ Causes the client to "​pretend"​ it received a given line of text from the server. Use with caution.
 +  * /[[shook]] \\ Causes a given hook to be triggered as if the event had actually occurred.
 +  * /[[xdebug command|xdebug]] inbound (not officially supported) \\ Shows all data received from the server. This generates a lot of duplicate output.
 +  * /[[xdebug command|xdebug]] outbound (not officially supported) \\ Shows all data sent to the server. This generates a lot of output.
 +  * /[[eval]] \\ About the only time you should use this, at the command line to see if a fragment of code behaves as expected.
 +  * /[[echo]] \\ Adding a few well placed /echo statements are a good way to check to make sure that things are as they seem. You can use them to make sure code that is supposed to be executed really is, and to check on the state of variables.
 +  * /​[[package]],​ /[[unload]] \\ These provide a way to unload scripts, saving you repeated restarts of the client.
 +  * /[[dump]] \\ Purge hooks, variables, and or aliases. This can be used to restore the client to a known state.
 +  * /[[call]]
 +  * /[[abort]]
 +
 +There is also a contributed script, [[debug.irc]] included with the client.
 +This serves as an example of how to use /set debug debugging modes in a script
 +with a large number of /[[on]] hooks to debug only specific sections of code.
 +
  
debugging.txt ยท Last modified: 2006/08/29 20:18 (external edit)