2021-04-05 17:29:49 +02:00
.. _plugin-Debug:
Documentation for the Debug plugin for Supybot
==============================================
Purpose
-------
This is for developers debugging their plugins; it provides an eval command
as well as some other useful commands.
It should not be loaded with a default installation.
Usage
-----
This plugin provides debugging abilities for Supybot. It
should not be loaded with a default installation.
2021-04-05 22:56:40 +02:00
.. _commands-Debug:
2021-04-05 17:29:49 +02:00
Commands
--------
2021-04-17 20:09:33 +02:00
.. _command-debug-channeldb:
2021-04-05 22:56:40 +02:00
2021-04-05 17:29:49 +02:00
channeldb [<channel> ]
Returns the result of the channeldb converter.
2021-04-17 20:09:33 +02:00
.. _command-debug-collect:
2021-04-05 22:56:40 +02:00
2021-04-05 17:29:49 +02:00
collect [<times> ]
Does <times> gc collections, returning the number of objects collected each time. <times> defaults to 1.
2021-04-17 20:09:33 +02:00
.. _command-debug-environ:
2021-04-05 22:56:40 +02:00
2021-04-05 17:29:49 +02:00
environ takes no arguments
Returns the environment of the supybot process.
2021-04-17 20:09:33 +02:00
.. _command-debug-eval:
2021-04-05 22:56:40 +02:00
2021-04-05 17:29:49 +02:00
eval <expression>
Evaluates <expression> (which should be a Python expression) and returns its value. If an exception is raised, reports the exception (and logs the traceback to the bot's logfile).
2021-04-17 20:09:33 +02:00
.. _command-debug-exec:
2021-04-05 22:56:40 +02:00
2021-04-05 17:29:49 +02:00
exec <statement>
Execs <code>. Returns success if it didn't raise any exceptions.
2021-04-17 20:09:33 +02:00
.. _command-debug-exn:
2021-04-05 22:56:40 +02:00
2021-04-05 17:29:49 +02:00
exn <exception name>
Raises the exception matching <exception name>.
2021-04-17 20:09:33 +02:00
.. _command-debug-sendquote:
2021-04-05 22:56:40 +02:00
2021-04-05 17:29:49 +02:00
sendquote <raw IRC message>
Sends (not queues) the raw IRC message given.
2021-04-17 20:09:33 +02:00
.. _command-debug-settrace:
2021-04-05 22:56:40 +02:00
2021-04-05 17:29:49 +02:00
settrace [<filename> ]
Starts tracing function calls to <filename>. If <filename> is not given, sys.stdout is used. This causes much output.
2021-04-17 20:09:33 +02:00
.. _command-debug-simpleeval:
2021-04-05 22:56:40 +02:00
2021-04-05 17:29:49 +02:00
simpleeval <expression>
Evaluates the given expression.
2021-04-17 20:09:33 +02:00
.. _command-debug-unsettrace:
2021-04-05 22:56:40 +02:00
2021-04-05 17:29:49 +02:00
unsettrace takes no arguments
Stops tracing function calls on stdout.
2021-04-17 20:09:33 +02:00
.. _conf-Debug:
2021-04-05 17:29:49 +02:00
Configuration
-------------
2021-04-17 20:09:33 +02:00
.. _conf-supybot.plugins.Debug.public:
2021-04-22 00:29:15 +02:00
2021-04-05 17:29:49 +02:00
supybot.plugins.Debug.public
This config variable defaults to "True", is not network-specific, and is not channel-specific.
Determines whether this plugin is publicly visible.