[How To] Turning on debug mode

Status
Not open for further replies.

Floris

I'm just me :) Hi.
Staff member
Joined
Jan 1, 2001
Messages
60,096
How do I turn on XenForo debug mode?

Well, you should not have to! Because it's meant for the developers of the product, and the errors are logged in the table xf_error_log

Debug mode is needed by developers to create, customize and export their XenForo products.

Please note the very important warning that comes with running in debug mode: You can cause damage you can't restore from - ever .. if you don't know why you need it: Don't use it! Always back up your database and files prior to changing anything Running your board in debug mode can be a performance hit, due to the additional queries and code executed for debug mode..

Unless you are a core developer, or an addon developer that knows what she/he is doing, one should NOT ever run their XenForo site in debug mode true, it can do irreversible damage to the database.

The footer details for debug mode true include the additional queries and code, therefor the amount of time, memory and queries used, is higher than without debug mode set to true.

When debug mode is set to true, the footer will list something like:

timing: 0.0763 seconds Memory: 4.928 MB DB Queries: 11

Clicking on the time will go to an explain page, where you can see queries run, files used, etc.

By default debug mode is not set to true.

upload/library/config.php can be used to turn on debug mode (setting it to true)

$config['debug'] = true;

Before you turn on debug mode, if the intention is to catch errors, one can leave debug mode to false, and check the rows in the database table: xf_error_log

I've created a tool by the way that helps with style and add-on development: http://xenfans.com/threads/product-xenfans-com-extra-debug.1422/
 
Status
Not open for further replies.
Top