No announcement yet.

Configuring Debug Mode


  • Configuring Debug Mode

    Debug mode is useful for development purposes- it is required if you will be creating VB5 Modifications you intend to distribute for others to download. However it is also useful for trouble-shooting issues with your site as debug mode often provides more specific error messages when something goes wrong- as such if you are having trouble support will often ask you to put your site into debug mode.

    Debug mode requires two small file edits in vBulletin 5. This is because VB5 has two config.php files by design. Both files require an edit and it is a little different for each.

    Please note- before editing any PHP files be sure you have a real code/text editor. The built in Windows Notepad should never be used to edit PHP files- Windows Notepad can often add invisible characters to code files that will cause errors once your re-upload the edited files. Windows users should instead download one of the many free alternatives. Two popular free text editors for Windows (all versions) are:

    Notepad2 - Available from Flo's Freeware - Looks almost exactly like regular Notepad, Native 32bit and 64bit versions.
    Notepad++ - Available from - A little more advanced than Notepad2

    I am not aware of any problems with the built in text editors in Max OSX or Linux but there are plenty of advanced free editors available for all systems.

    Once you have your text editor setup the first edit is to your front-end or "Presentation" config,php file. This is the one in your forum-root directory.

    Download this file from your server and open it in a text editor. Look for the line that says:
    PHP Code:
    $config['debug'] = false

    Here is a screenshot from the VB 5.0.5 config.php file-
    Click image for larger version

Views:	0
Size:	65.0 KB
ID:	4460788

    Edit the line to say:

    PHP Code:
    $config['debug'] = true
    Then save the file and re-upload it to your server overwriting the existing file.

    Test your site- make sure it loads- it should- if you run into any problem simply re-copy the original config.php file from the original VB Install package and overwrite it, but it is very unlikely you will have an issue.

    Now we must make the 2nd edit. This edit is to the back-end or "core" config.php file which is in your /core/includes/ directory.

    This file contains a lot of important information for your database which is not as easily replaced as the front-end file should something go wrong, so please save a back-up of this file somewhere else on your computer before editing the original file.

    Download a copy of this file and find the line that says

    PHP Code:
    // $config['Misc']['debug'] = true; 
    This is toward the end of the file, below is a screenshot-

    Edit the line to remove the two slashes // at the front and then re-save and re-upload the file.

    PHP Code:
    $config['Misc']['debug'] = true
    Now check your site one more time- it should both be working and be in debug mode.

    You will know it is in debug mode when there is a bunch of extra information shown below pages on the front end- example:

    Debug mode in the back-end (Admin CP) is a little less noticeable. There will be several new/more options mostly for those developing their own modifications. One way to tell is to go to Admin CP -> Style Manager and you will now see the "Master Style" visible above all other styles as below:

    If you see these changes you have confirmed you are in debug mode.

    To disable debug mode you basically reverse the above, edit each file and undo the changes.

    Note- if in either of the above files you can't find the text I say to look for you can safely simply add the line $config['debug'] = true; to the front-end/presentation file or $config['Misc']['debug'] = true; to the back-end/core file and that will work as well. Add it at the very top, just below the first line of the file which should be <?php.

    To undo the above changes simply comment out the line by adding two slashes // at the start of the line so it will be ignored as if it didn't exist. This way should you need to enable it again you just have to remove those slashes.

    • BirdOPrey5
      BirdOPrey5 commented
      Editing a comment
      vBcloud users should create a support ticket and support staff can enter debug mode themselves to check the issue.

    • avitor
      avitor commented
      Editing a comment
      thanks for this help

    • Craig
      Craig commented
      Editing a comment
      Please add to /articles/vbulletin-5-connect-aa/vbulletin-5-tutorials
    Posting comments is disabled.

About the Author


BirdOPrey5 The details of my life are quite inconsequential... Find out more about BirdOPrey5

Article Tags


Latest Articles


  • Creating a Redirect Channel
    by Wayne Luke

    In older versions of vBulletin, you could specify a URL to redirect a forum to another location. This could be on your site or elsewhere. With the release of vBulletin 5, this functionality was removed. You can recreate this functionality using Template Hooks. I will outline the steps to create a channel redirect here.

    Note: This functionality is not available on vBulletin Cloud at this time.
    This tutorial involves changing options, creating custom templates and building a temple hook. Allowi...
    Wed 5 Feb '20, 6:09pm
  • The Basic Anatomy of a vBulletin Page
    by Wayne Luke
    vBulletin 5's user output is created using a system of pages that are customizable by the site administrator. This system is called Site Builder. By breaking the system down into pages, a lot of control is given to the system administrator. By using Site Builder, you can create a unique site without any knowledge of HTML or CSS.

    vBulletin's pages are created using layers built upon a grid layout. Each page starts with a layout which defines the content areas of the page. Layouts define...
    Mon 11 Sep '17, 8:55am
  • Enabling Two-Factor Authentication
    by Wayne Luke
    vBulletin 5.3.0 and higher will allow site owners to enable Two-Factor Authentication for Administrator and Moderator functionality. This is an extra layer of security provided to make sure your user data remains as safe as possible. Two-Factor Authentication works in conjunction with an app on the user's smartphone, tablet, or computer. These apps provide a security token that lasts a limited time before expiring. The security token is created using industry standard algorithms and a unique string...
    Tue 4 Apr '17, 8:38am
  • How to moderate the posts of new users only
    by Wayne Luke
    To help combat spam, many users opt to have new user’s posts moderated until they’ve made a specific number of posts. This allows the Admin/Moderator team to keep potentially malicious posts out of the public eye until a user has effectively passed a ‘probationary period’ as a member of the site.

    In order to do this, you will need to create a custom usergroup and a promotion.

    Creating a Custom Usergroup
    First, you need to setup the usergroup for your non-Moderated...
    Wed 22 Feb '17, 9:13am
  • Rebuilding the Sphinx index
    by Wayne Luke
    From time to time, we will need to update the indexing schema for the Sphinx server. In order for this fix to take effect, you will need to update the sphinx schema for the index. Follow these steps to rebuild your Sphinx Search Schema.
    1. Stop the Sphinx service on your server.
    2. Replace your existing Sphinx configuration file (vbulletin-sphinx.php) with the one provided in the current version of vBulletin 5 Connect. You can find this file in the do_not_upload directory.
    3. Update the file as provided
    Fri 3 Feb '17, 1:01pm
  • Using the Search JSON
    by Dominic
    Using the advanced editor you can create powerful search modules. Following you find possible filters / parameters for using within these modules:
    The search JSON parameter has the following format:

    { "filter": <value>, "filter": <value>, ... }
    <value> may be any valid string, number or JSON structure and will be interpreted by the specified filter. Filters not listed below are ignored.


    The valid filters...
    Wed 28 Jan '15, 12:51pm