0
0
Wordpressframework~10 mins

Debugging with WP_DEBUG in Wordpress - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enable debugging in WordPress by setting WP_DEBUG to true.

Wordpress
define('WP_DEBUG', [1]);
Drag options to blanks, or click blank then click option'
Atrue
Bnull
Cfalse
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Setting WP_DEBUG to false disables debugging.
Using 1 instead of true works but true is preferred for clarity.
2fill in blank
medium

Complete the code to log errors to a file by enabling WP_DEBUG_LOG.

Wordpress
define('WP_DEBUG_LOG', [1]);
Drag options to blanks, or click blank then click option'
A0
Bfalse
Cnull
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Setting WP_DEBUG_LOG to false disables logging.
For logging to work, WP_DEBUG must also be true.
3fill in blank
hard

Fix the error in the code to hide errors from displaying on the site by setting WP_DEBUG_DISPLAY correctly.

Wordpress
define('WP_DEBUG_DISPLAY', [1]);
Drag options to blanks, or click blank then click option'
A1
Bfalse
Cnull
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Setting WP_DEBUG_DISPLAY to true shows errors on the site.
Using 1 instead of false will show errors.
4fill in blank
hard

Fill both blanks to enable debugging and log errors but hide them from displaying on the site.

Wordpress
define('WP_DEBUG', [1]);
define('WP_DEBUG_DISPLAY', [2]);
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
Cnull
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Setting WP_DEBUG to false disables debugging.
Setting WP_DEBUG_DISPLAY to true shows errors publicly.
5fill in blank
hard

Fill all three blanks to enable debugging, log errors to a file, and hide errors from displaying on the site.

Wordpress
define('WP_DEBUG', [1]);
define('WP_DEBUG_LOG', [2]);
define('WP_DEBUG_DISPLAY', [3]);
Drag options to blanks, or click blank then click option'
Afalse
Btrue
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing true and false values for these constants.
Not enabling WP_DEBUG disables all debugging features.