1. Home
  2. Documentation
  3. WordPress SDK
  4. Debugging

Debugging

Freemius has some pretty comfortable options for debugging and logging to make the process of integration easier for you, the developer:

Development Mode

During development and testing, add define( 'WP_FS__DEV_MODE', true ); to your dev environment’s wp-config.php in order to display the Freemius Debug menu item.

Freemius SDK - Development mode WP Admin menu item

Important Warning
Activating development mode also sets the SDK for debugging, which among other things, will turn the SDK’s logging system on:

  • Logs are stored in the DB, so activating logging on a highly-active production site can quickly fill up the DB storage.
  • Logs are also printed out to the console log, so if a highly-active site utilizes a filesystem caching plugin while running in debug mode, the site’s disk may fill up quickly.
Therefore, don’t forget to turn development mode off after a troubleshooting completion.

Freemius Debug Page

You can access Freemius Debug page directly via {domain}/wp-admin/admin.php?page=freemius to get information about the active SDK, Freemius powered plugins on the site, users and more.

Freemius SDK - Debug Page

Logging

When WP_FS__DEV_MODE is set to true in the wp-config.php, it will automatically activate the logger that outputs all of the logs into your browser’s debugging console.

Freemius SDK - Development mode showing developers browser console logging

If you are using Debug Bar, Freemius is fully integrated with it:

Freemius SDK - Development mode integration with WP debug bar

If you aren’t using Debug Bar, you can optionally output all of the logs to the screen by adding &fs_dbg_echo=true to the query string.

Security Tip: Adding fs_dbg_echo=true to the query string will only work when Freemius is set into development mode. Therefore, websites that are using your product are not in risk of exposing the logs unless an admin sets WP_FS__DEV_MODE to true or manually turn on the debugging switch in the Freemius Debug page.