Switch Dolibarr to debug mode
Debug mode is used to gather as much technical information as possible to help us “see more clearly”, with the aim of correcting a bug or a specific problem. Debug mode is temporary and has no consequences other than the time it is active. During this time your dolibarr will be much slower than usual because it collects and stores all the information in a file … which is why it is important to deactivate debug mode once you have finished.
1. Delete old log files
To avoid sending us X months of history and a huge file, start by
- deactivate the log module
- Identify yourself on your dolibarr using an administrator account, then follow the guide:
- Home
- Configuration
- Modules/Applications
- Then look for the “Debug logs and traces” module and deactivate it if it was active. If it was not active, do nothing and go on to the next step.
- Delete the dolibarr.log file from your documents folder (via (s)FTP access) as well as the other .log files in this folder.
2. Activate debug mode
Identify yourself on your dolibarr using an administrator account, then follow the guide:
- Home
- Configuration
- Modules/Applications
- Then look for the “Debug logs and traces” module and activate it, then click on the module configuration icon:
In the debug module configuration, check that:
- 1) the debug destination is the dolibarr.log file
- 2) the log level is set to debug
(modify the configuration if necessary and remember to click on the “modify” button if necessary)
3. Cause the bug
Now that debug mode is active, create the bug for which you were asked to activate debug mode. Make a note of the various steps involved in causing the bug and take screenshots if you see any error messages. Try to capture the clock too, if it's visible on your screen, so that we can look in the right place in the log file…
Once the bug has occurred, go back to the debug module configuration.
4. Download the .log files
Click on the download link, save the dolibarr.log file and send it by e-mail or copy it to our technical support interface.
If possible, also connect via (s)FTP to retrieve and send us the other .log files that are in the same folder and from which you probably deleted the previous versions in step 1. This is particularly true if we need to track down bugs launched by scheduled tasks or on slightly specific modules that generate separate log files (for example for the Stancer or UptoSign modules).
5. Disable the debug module
This time go back to the list of dolibarr modules → Home → Configuration → Modules/Applications then uncheck the “Debug logs and traces” module. This will avoid slowing down your dolibarr for nothing and saturating your storage space.