Skip to content

set debug

Will Strohl edited this page Mar 1, 2022 · 1 revision

set-debug

When used, this command will enable or disable debug mode in DNN, in three different areas.

  • Website configuration file (web.config)
  • Log4net configuration file (DotNetNuke.log4net.config)
  • Host Settings (security > more > debug mode)

If doing this manually, it can take several minutes in some cases and is prone to human error. Using this approach ensures you get all of the information you're looking for faster and without accidentally creating additional issues.

This prevents:

  • Someone from forgetting to turn off one of the debug settings.
  • Placing a typo in one of the configuration files.
  • Using an incorrect value in one of the settings.
  • Using incompatible values, such as forgetting to debug in one or more places.

So you're not only saving time, but you're reducing risk and this does not require direct access to the server.

WARNING: When debugging is changed on the website, the website will automatically restart. This not only clears cache, but it literally restarts the website, causing all page loads to experience slow load times for a few moments. How long depends on the individual website.

Command

Command Description
set-debug This command works like a toggle. Entering it will reverse the prior operation. If in debug, it gets turned off. If already off, it's turned on.

Arguments

This prompt does not have any flags at this time.

Output

If successful, you'll see a message like below in the Prompt window.

When turning OFF debug mode:

Debugging has been turned off in all areas of the site.  

When turning ON debug mode:

Debugging has been enabled throughout the site. All visitors will experience slow page loads for the next few moments.  

If an error occurs, it should be displayed to you in the Prompt window. If not, you'll find it in the Log4net log files.

Additional Notes

When debug is turned ON:

  • The web.config file has debug mode turned on (true) in the system.web > configuration node.
  • The log4net file begins to log All.
  • The security > debug setting is turned on.

When debug is turned OFF:

  • The web.config file has debug mode turned off (false) in the system.web > configuration node.
  • The log4net file begins to log Error.
  • The security > debug setting is turned off.
Clone this wiki locally