Title: WP Debugging
Author: Andy Fragen
Published: <strong>3 Febbraio 2019</strong>
Last modified: 2 Dicembre 2024

---

Ricerca i plugin

![](https://ps.w.org/wp-debugging/assets/banner-772x250.png?rev=2552243)

![](https://ps.w.org/wp-debugging/assets/icon.svg?rev=2842498)

# WP Debugging

 Di [Andy Fragen](https://profiles.wordpress.org/afragen/)

[Scarica](https://downloads.wordpress.org/plugin/wp-debugging.2.12.2.zip)

 * [Dettagli](https://it.wordpress.org/plugins/wp-debugging/#description)
 * [Recensioni](https://it.wordpress.org/plugins/wp-debugging/#reviews)
 * [Sviluppo](https://it.wordpress.org/plugins/wp-debugging/#developers)

 [Supporto](https://wordpress.org/support/plugin/wp-debugging/)

## Descrizione

Questo plugin imposta le seguenti costanti di debug in `wp-config.php` all’attivazione
del plugin e le rimuove alla disattivazione. Qualsiasi errore comporterà il lancio
di un’eccezione PHP. Costanti di debug secondo [Debug in WordPress](https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/).

Impostazioni predefinite:

    ```
    define( 'WP_DEBUG_LOG', true );
    define( 'SCRIPT_DEBUG', true );
    define( 'SAVEQUERIES', true );
    ```

 
 @ini_set( ‘display_errors’, 1 ); viene impostato quando il plugin è attivo `WP_DEBUG`
viene impostato su true al primo avvio del plugin, dopodiché può essere disattivato
nelle Impostazioni.

La pagina Impostazioni consente all’utente di impostare quanto segue.

    ```
    define( 'WP_DEBUG', true ); // Default on initial plugin installation.
    define( 'WP_DEBUG_DISPLAY', false ); // Default when not declared is true.
    define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true ); // WordPress 5.2 WSOD Override.
    ```

When the plugin is deactivated best efforts are made to re-add pre-existing constants
to their former state. When the plugin is activated the default settings and any
saved settings are restored.

This plugin uses the [wp-cli/wp-config-transformer](https://github.com/wp-cli/wp-config-transformer)
command for writing constants to `wp-config.php`.

[Debug Quick Look](https://github.com/norcross/debug-quick-look) from Andrew Norcross
is included with this plugin to assist in reading the debug.log file. If you already
have this plugin installed you should delete it when WP Debugging is not active.

[Query Monitor](https://wordpress.org/plugins/query-monitor/) and [Debug Bar](https://wordpress.org/plugins/debug-bar/)
plugins are optional dependencies to aid in debugging and troubleshooting. The notice
for installation will recur 45 days after being dismissed.

If you have a non-standard location for your `wp-config.php` file you can use the
filter `wp_debugging_config_path` to return the file path for your installation.

Il filtro `wp_debugging_add_constants` consente all’utente di aggiungere costanti
al file `wp-config.php`.

Il filtro restituisce un array in cui le chiave è il nome della costante ed il valore
è un array di dati che contenente il valore come stringa e un valore booleano per
indicare se il valore deve essere passato senza virgolette o meno.

    ```
    $my_constants = [
        'my_test_constant' =>
        [
            'value' => 'abc123',
            'raw' => false,
        ],
        'another_test_constant' => [ 'value' => 'true' ],
    ];
    ```

L’opzione `value` contiene il valore della costante come stringa.

L’opzione `raw` significa che, invece di inserire il valore nella configurazione
come stringa, questo verrà visualizzato senza virgolette. Il valore predefinito 
è `true`. Impostare su `false` per i valori non booleani.

Esempio:

    ```
    add_filter(
        'wp_debugging_add_constants',
        function( $added_constants ) {
            $my_constants = [
                'my_test_constant'      => [
                    'value' => '124xyz',
                    'raw'   => false,
                ],
                'another_test_constant' => [ 'value' => 'true' ],
            ];
            return array_merge( $added_constants, $my_constants );
        },
        10,
        1
    );
    ```

Questo creerà le seguenti costanti.

    ```
    define( 'MY_TEST_CONSTANT', '124xyz' );
    define( 'ANOTHER_TEST_CONSTANT', true );
    ```

### Sviluppo

PRs are welcome against the [develop branch on GitHub](https://github.com/afragen/wp-debugging).

## Screenshot

 * [[
 * Schermata impostazioni

## Recensioni

![](https://secure.gravatar.com/avatar/eb5de3db5bfc8ef5845b4173265bf3d079f460fb99c9e346380b04d07bea8f05?
s=60&d=retro&r=g)

### 󠀁[Absolutely essential for debugging – saved me countless times!](https://wordpress.org/support/topic/absolutely-essential-for-debugging-saved-me-countless-times/)󠁿

 [Mehraz Morshed](https://profiles.wordpress.org/mehrazmorshed/) 18 Aprile 2026

I’ve been using the WP Debugging plugin since 2024, and it has been a lifesaver.
The error log feature alone helped me track down several issues that would have 
taken hours to find manually. The fact that it integrates with Query Monitor is 
a nice bonus too. If you do any WordPress development or troubleshooting, just install
this plugin. Five stars, no hesitation.

![](https://secure.gravatar.com/avatar/75af23b76161bec953b27cab749783845b746fe40ca95f323c59f57a7c745006?
s=60&d=retro&r=g)

### 󠀁[Perfect](https://wordpress.org/support/topic/perfect-10572/)󠁿

 [coriolis_too](https://profiles.wordpress.org/coriolis_too/) 9 Novembre 2024

Simple and easy to use. Does what is says

![](https://secure.gravatar.com/avatar/af5d6597994791593777acc5b0ed8a154aeebf837af76c91ce0d519ae769a4bb?
s=60&d=retro&r=g)

### 󠀁[Another great debugging plugin](https://wordpress.org/support/topic/another-great-debugging-plugin/)󠁿

 [Jamie](https://profiles.wordpress.org/codente/) 23 Febbraio 2024

Yet another one of your plugins that I love and use all the time! Thank you. (Side
note: is there a place to buy you a coffee or donate for your time?)

![](https://secure.gravatar.com/avatar/c83b9f1dda7f2dbed5a6c61d38e65c84b3af2c1b6a79a722d0f65f6894a700b3?
s=60&d=retro&r=g)

### 󠀁[Makes debugging so much easier.](https://wordpress.org/support/topic/makes-debugging-so-much-easier/)󠁿

 [ld2digital](https://profiles.wordpress.org/ld2digital/) 29 Dicembre 2023

I use this on all of my sites to streamline debugging. It saves so much time and
hassle.

![](https://secure.gravatar.com/avatar/e53adb8dbefa0ec8b6d55b4faf812f5d3d88b334970761ef15d46eac80edb920?
s=60&d=retro&r=g)

### 󠀁[Very useful!](https://wordpress.org/support/topic/very-useful-3391/)󠁿

 [Pulak Ahmed](https://profiles.wordpress.org/pulak00/) 6 Dicembre 2023

Very helpful tool for debugging the conflicts.

![](https://secure.gravatar.com/avatar/ea10706e217b842ead8d4c0f1aa56d2fd6abd535266f51fea0c21b6b34b687d2?
s=60&d=retro&r=g)

### 󠀁[Helpful, light-weight plugin](https://wordpress.org/support/topic/helpful-light-weight-plugin-2/)󠁿

 [pic2click](https://profiles.wordpress.org/pic2click/) 13 Novembre 2023

This little plugin was a lifesaver for a site of ours, self-hosted via docker. The
implementation left us with a curious problem … some configuration someplace somewhere
other than the standard lines in wp-config.php was overriding our WP_DEBUG setting.
This plugin solved that.

 [ Leggi tutte le recensioni di 19 ](https://wordpress.org/support/plugin/wp-debugging/reviews/)

## Contributi e sviluppo

“WP Debugging” è un software open source. Le persone che hanno contribuito allo 
sviluppo di questo plugin sono indicate di seguito.

Collaboratori

 *   [ Andy Fragen ](https://profiles.wordpress.org/afragen/)

“WP Debugging” è stato tradotto in 10 lingue. Grazie a [chi traduce](https://translate.wordpress.org/projects/wp-plugins/wp-debugging/contributors)
per il contributo.

[Traduci “WP Debugging” nella tua lingua.](https://translate.wordpress.org/projects/wp-plugins/wp-debugging)

### Ti interessa lo sviluppo?

[Esplora il codice](https://plugins.trac.wordpress.org/browser/wp-debugging/) segui
il [repository SVN](https://plugins.svn.wordpress.org/wp-debugging/), segui il [log delle modifiche](https://plugins.trac.wordpress.org/log/wp-debugging/)
tramite [RSS](https://plugins.trac.wordpress.org/log/wp-debugging/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.12.2 / 2024-12-02

 * add GA to generate POT
 * update for PCP

#### 2.12.1 / 2024-11-08

 * move `register_activation_hook` and `register_deactivation_hook` up the chain

#### 2.12.0 / 2024-11-01

 * exit early(ish) if not on WP Debugging settings page
 * composer update
 * remove `load_plugin_textdomain()`

#### 2.11.24 / 2024-04-29

 * update link to Debugging in WordPress, thanks @tobifjellner
 * cast variable to array in `Bootstrap::deactivate()` fix for PHP 8.3

#### 2.11.23 / 2024-03-04

 * composer update
 * WPCS updates

#### 2.11.22 / 2023-05-31 🎂

 * update `afragen/wp-dismiss-notice`

#### 2.11.21 / 2023-04-29

 * update `afragen/wp-dismiss-notice`
 * update Debug Quick Look

#### 2.11.18, 2.11.19, 2.11.20 / 2023-02-07

 * composer update

#### 2.11.17 / 2023-01-27

 * updated link to _Debugging in WordPress_ and improved text for translators
 * composer update

#### 2.11.16 / 2023-01-19

 * composer update

#### 2.11.15 / 2023-01-02

 * composer update

#### 2.11.14 / 2022-07-15

 * composer update

#### 2.11.13 / 2022-06-23

 * make anchor `preg_match` more greedy

#### 2.11.12 / 2022-05-29

 * update to latest `afragen/debug-quick-look`

#### 2.11.11 / 2022–5-16

 * update `wp-dismiss-notice` with transient and only poll `wp_remote_get()` weekly

#### 2.11.10 / 2022-05-10

 * use `sanitize_key()` for nonces
 * composer update

#### 2.11.9 / 2022-02-05

 * composer update

#### 2.11.8 / 2022-01-24

 * load call to `WP_Dependency_Installer()` in `plugins_loaded` hook to avoid loading`
   pluggable.php`.
 * update `WP_Dependency_Installer`

#### 2.11.7 / 2022-01-18

 * fix logic in verify nonce conditional

#### 2.11.6 /2022-01-18

 * proper nonce verification
 * composer updates

#### 2.11.5 / 2022-01-11

 * I messed up the release 🤦‍♂️

#### 2.11.4 / 2022-01-10

 * composer updates

#### 2.11.3 / 2021-12-19

 * more fixes via composer update

#### 2.11.2 / 2021-09-24

 * composer update, cause of course I needed to fix something

#### 2.11.1 / 2021-09-24

 * init in `plugins_loaded` hook
 * composer update

#### 2.11.0 / 2021-09-23

 * fix security issue for capabilities check, possible CSRF, and nonce checks.

#### 2.10.2 / 2021-09-04

 * only use `esc_attr_e` for translating strings

#### 2.10.1 / 2021-07-23

 * fix PHP Notice, `Settings:line 68`
 * update Debug Quick Look admin bar menu for mobile

#### 2.10.0 / 2021-06-30

 * update Debug Quick Look to show menu on mobile

#### 2.9.3 / 2021-06-22

 * update WPConfigTransformer to use alternate anchor if default not present
 * add @10up GitHub Actions for WordPress svn integration

#### 2.9.1 / 2020-11-17

 * update `wp-dependency-installer` library
 * update `wp-cli/wp-config-transformer`
 * comment out quote normalization in `set_pre_activation_constants()`, not sure
   why I did that but it can cause problems [#10](https://github.com/afragen/wp-debugging/issues/10)

#### 2.9.0 / 2020-08-15

 * use try/catch around use of `WPConfigTransformer` object

#### 2.8.0 / 2020-08-01

 * exit if called directly
 * NB: I have seen the `WPConfigTransformer` Exception error live. The issue seems
   to be that a `file_get_contents()` on the `wp-config.php` file path, at random
   times, returns an empty value. I’m done chasing this random error in `wp-cli/
   wp-config-transformer`. Modified version of `wp-cli/wp-config-transformer` present

#### 2.7.2 / 2020-06-01

 * test `wp-config.php` everywhere, still occasional WSOD reports.

#### 2.7.1 / 2020-5-15

 * return early if `wp-config.php` is empty before calling `WPConfigTransformer`

#### 2.7.0 / 2020-04-30

 * start loading in `init` hook
 * run `process_filter_constants()` as chained method in `Bootstrap`

#### 2.6.1 / 2020-03-28

 * move `Settings` action link to front
 * change test for `wp-config.php` file empty

#### 2.6.0 / 2020-02-28

 * load autoloader in main file
 * update composer dependencies

#### 2.5.8 / 2019-12-23

 * badly messed up check for empty `wp-config.php`

#### 2.5.7 / 2019-12-20

 * check and exit early if `wp-config.php` is empty
 * return empty array for the above exit

#### 2.5.6 / 2019-11-02

 * early exit if `wp-config.php` not set in specific functions

#### 2.5.5 / 2019-09-17

 * update composer.json for wp-dependency-installer update, now requires at least
   PHP 5.6 for spread operator
 * composer update

#### 2.5.4 / 2019-04-25

 * added check for writable `wp-config.php`, exit with notice if not found

#### 2.5.3 / 2019-04-01

 * update `Debug Quick Look` to display error log file path

#### 2.5.1 / 2019-04-01

 * updated version of wp-cli/wp-config-transformer

#### 2.5.0 / 2019-03-25

 * added `wp_debugging_add_constants` filter for users to add their own constants

#### 2.4.3 / 2019-03-09

 * missed an output escape

#### 2.4.2 / 2019-02-26

 * add `Domain Path` header

#### 2.4.1 / 2019-02-10

 * refactor set/restore pre-activation constants

#### 2.4.0 / 2019-02-06

 * save pre-activation constants for re-installation on deactivation ( say that 
   5x fast )

#### 2.3.0 / 2019-02-04

 * look for `wp-config.php` in directory above `ABSPATH`
 * add filter `wp_debugging_config_path` to set non-standard path to `wp-config.
   php`

#### 2.2.0 / 2019-02-02 🏈

 * initial release on dot org

#### 2.1.1 / 2019-02-01

 * only show WSOD bypass when appropriate
 * update dependencies

#### 2.1.0 / 2019-01-26

 * update Debug Quick Look, minor CSS changes
 * Improve messaging
 * add setting for WP_DISABLE_FATAL_ERROR_HANDLER constant (WSOD)
 * add default setting of WP_DEBUG to true, can be changed

#### 2.0.0 / 2019-01-18

 * total re-write
 * add settings page
 * use `wp-cli/wp-config-transformer` to change `wp-config.php`
 * include `norcross/debug-quick-look` as dependency via composer but use my fork
 * update POT via `composer.json` and wp-cli
 * add image assets

## Meta

 *  Versione **2.12.2**
 *  Ultimo aggiornamento **1 anno fa**
 *  Installazioni attive **10.000+**
 *  Versione WordPress ** 5.2 o superiore **
 *  Testato fino alla versione **6.8.5**
 *  Versione PHP ** 5.6 o superiore **
 *  Lingue
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/wp-debugging/), [English (Australia)](https://en-au.wordpress.org/plugins/wp-debugging/),
   [English (US)](https://wordpress.org/plugins/wp-debugging/), [French (France)](https://fr.wordpress.org/plugins/wp-debugging/),
   [German](https://de.wordpress.org/plugins/wp-debugging/), [Italian](https://it.wordpress.org/plugins/wp-debugging/),
   [Japanese](https://ja.wordpress.org/plugins/wp-debugging/), [Portuguese (Portugal)](https://pt.wordpress.org/plugins/wp-debugging/),
   [Spanish (Chile)](https://cl.wordpress.org/plugins/wp-debugging/), [Spanish (Spain)](https://es.wordpress.org/plugins/wp-debugging/),
   e [Swedish](https://sv.wordpress.org/plugins/wp-debugging/).
 *  [Traduci nella tua lingua](https://translate.wordpress.org/projects/wp-plugins/wp-debugging)
 * Tag
 * [debug](https://it.wordpress.org/plugins/tags/debug/)[support](https://it.wordpress.org/plugins/tags/support/)
   [wp-config](https://it.wordpress.org/plugins/tags/wp-config/)
 *  [Visualizzazione avanzata](https://it.wordpress.org/plugins/wp-debugging/advanced/)

## Valutazioni

 5 su 5 stelle.

 *  [  20 recensioni a 5-stelle     ](https://wordpress.org/support/plugin/wp-debugging/reviews/?filter=5)
 *  [  0 recensioni a 4-stelle     ](https://wordpress.org/support/plugin/wp-debugging/reviews/?filter=4)
 *  [  0 recensioni a 3-stelle     ](https://wordpress.org/support/plugin/wp-debugging/reviews/?filter=3)
 *  [  0 recensioni a 2-stelle     ](https://wordpress.org/support/plugin/wp-debugging/reviews/?filter=2)
 *  [  0 recensioni a 1-stelle     ](https://wordpress.org/support/plugin/wp-debugging/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-debugging/reviews/#new-post)

[Vedi tutte le recensioni](https://wordpress.org/support/plugin/wp-debugging/reviews/)

## Collaboratori

 *   [ Andy Fragen ](https://profiles.wordpress.org/afragen/)

## Supporto

Hai qualcosa da dire? Ti serve aiuto?
Problemi risolti negli ultimi due mesi:

     0 su 1

 [Chiedi nel forum di supporto](https://wordpress.org/support/plugin/wp-debugging/)

## Donazioni

Vuoi sostenere le versioni future?

 [ Fai una donazione per lo sviluppo ](https://thefragens.com/git-updater-donate)