Jump to content

Debug Mode Switch for ProcessWire


tcnet
 Share

Recommended Posts

This module for ProcessWire enables the debug mode to bypass the restriction to install modules. This is useful if you are tired to manually set the debug mode in the configuration.

Note
Please note that this module doesn't replace the real debug mode in the configuration file /site/config.php. With this module you will not receive any errors/notices/warnings like in the real debug mode. It serves only to bypass the restriction to install modules.

Installation
To install this module you have to enable the real debug mode. After installation you should deactivate debug mode again. To enable the real debug mode, download /site/config.php via FTP and open it in a text editor. Look for a line where you can find $config->debug = false; change it to $config->debug = true; save the file and upload it again. After module installation change it back to $config->debug = false;.

"Real Debug Mode"

For all future module installations, you just have to enable the debug mode in the module settings like described below. After module installation, you should deactivate it in the same way.

Settings
The settings for this module are located in the menu Modules=>Configure=>DebugModeSwitch.

"Settings"

Enable or deactivate debug mode
Set the checkmark (1) and click the submit button (2) will enable the debug mode (3). The debug mode can be also restricted for superusers only (4).

"Enable or deactivate debug mode"

Links
ProcessWire module directory: https://processwire.com/modules/debug-mode-switch/
Github: https://github.com/techcnet/DebugModeSwitch

  • Like 6
Link to comment
Share on other sites

14 hours ago, kixe said:

or simply

$config->debug = false;
$config->moduleInstall('download', true);

I thought the same thing but assumed I must be missing something.

@tcnet - can you please explain the advantage of this over the various moduleInstall options?

Link to comment
Share on other sites

27 minutes ago, adrian said:

I thought the same thing but assumed I must be missing something.

@tcnet - can you please explain the advantage of this over the various moduleInstall options?

What's new in ProcessWire 3.0.163?
See: https://weekly.pw/issue/324/
I created this module before ProcessWire 3.0.163. I thought it's time to publish it. If it is not desirable, I remove it again. Just tell me.

Link to comment
Share on other sites

Hi @tcnet - firstly, I am sorry if I came across as criticizing the module - it was genuine question - I thought perhaps there was some other advantage I wasn't aware of. For example, sometimes I want to be able to access the "Database Queries", "Timers", and "Autoload" sections that are only available in Tracy when debug mode is on. I was wondering if perhaps this module allowed for that.

Regarding the changes in 3.0.163 - I thought the ability to install modules being restricted to debug mode and the new $config->moduleInstall() options were both introduced in that version, but maybe I am wrong.

I don't see any reason to remove the module - I was just hoping for some clarification so we all know its benefits. Thanks for the contribution!

  • Like 1
Link to comment
Share on other sites

6 minutes ago, adrian said:

Hi @tcnet - firstly, I am sorry if I came across as criticizing the module - it was genuine question - I thought perhaps there was some other advantage I wasn't aware of. For example, sometimes I want to be able to access the "Database Queries", "Timers", and "Autoload" sections that are only available in Tracy when debug mode is on. I was wondering if perhaps this module allowed for that.

Regarding the changes in 3.0.163 - I thought the ability to install modules being restricted to debug mode and the new $config->moduleInstall() options were both introduced in that version, but maybe I am wrong.

I don't see any reason to remove the module - I was just hoping for some clarification so we all know its benefits. Thanks for the contribution!

Yes, the Debug Mode Tools-Panel is available. Please see the 3rd arrow in the last screenshot. But not all debug information seems to be available. I cannot see any PDO-Query or AutoLoad. Sorry.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...