/handbook/developing-for-block-editor-and-site-editor/debugging-configurations/
What We Do
Digital Platform MigrationsKey SolutionsManaged ServicesStaffing SolutionsIndustriesProducts
Discovery
Strategic consultancy & project roadmap
Growth Services
On demand development & consultation
Site Maintenance
Annual maintenance. Done for you
QE Services
Testing across SDLC for assured quality
Hosting Migration
Move to a performant hosting with zero downtime
WooCommerce
Enterprise commerce delivered without lock-in
AI
Unlock real use cases and integrations
All Services
A suite of services for any need
Technology STACK
eCommerce
Scale your e-commerce with WooCommerce, integrations, and custom extensions for growth.
EasyEngine
Server management tool that makes using WordPress on Nginx easy.
Web Auditor
Performance Audit & Insights for your Website.
rtMedia
A complete media management plugin for WordPress.
Resources

About Us

CLEAR
Resources
Developing for Block Editor and Site Editor
Improving developer experience
Debugging configurations
Topics
On this page
Query Monitor (QM) Plugin, WP_DEBUG Constants, and Xdebug
a. Query Monitor Plugin
b. WP_DEBUG Constants
c. Enabling Xdebug
Redux DevTools for Gutenberg Block Development
a. State Monitoring
b. Time-Travel Debugging
c. Action Comparison
Getting Started with Redux DevTools
Last updated on Mar 31, 2026
Debugging Configurations
Debugging is a crucial part of the development process, and WordPress offers several built-in tools and external utilities to streamline debugging. Two primary areas of focus in WordPress debugging are using the Query Monitor (QM) plugin and WP_DEBUG constants, alongside advanced tools like Xdebug for deeper debugging. For JavaScript-heavy parts of the Gutenberg editor, tools like Redux DevTools can be invaluable for debugging the state and actions of blocks.
Query Monitor (QM) Plugin, WP_DEBUG Constants, and Xdebug
When it comes to debugging in WordPress development, using tools like Query Monitor, WP_DEBUG constants, and Xdebug is essential for diagnosing issues efficiently. The Query Monitor plugin provides detailed insights into database queries, PHP errors, and hooks. WP_DEBUG constants offer customizable error logging, enabling better control over the debugging process. For deeper debugging, Xdebug integrates with your IDE, allowing breakpoints, step-through execution, and performance profiling. Combined, these tools form a robust debugging environment for any WordPress project.
a. Query Monitor Plugin
The Query Monitor (QM) plugin is an essential tool for WordPress developers, offering insights into various parts of a WordPress application. It provides information on database queries, PHP errors, hooks, scripts, styles, and more. Here’s how it helps with debugging:
- Database Queries: QM lists all queries run on a page, including the time taken for each query, the specific query string, and the file that triggered it. This helps identify slow queries or redundant database calls.
- PHP Errors and Warnings: It captures and displays any PHP notices, warnings, or fatal errors occurring on the page. Unlike PHP logs, it shows these errors directly in the WordPress admin or front end for easy access.
- Hooks and Actions: QM provides a detailed view of all hooks and actions that fire during a page load, helping you trace how and where certain functionality is triggered.
- Enqueued Scripts and Styles: You can easily debug which scripts and styles are loaded on a page, along with their dependencies. This is particularly helpful for debugging block editor-related issues with asset management.
- HTTP API Calls: QM tracks outgoing HTTP requests made via the WordPress HTTP API, showing the request URL, method, and response status.
b. WP_DEBUG Constants
WordPress provides several constants to enable debugging at different levels. These constants are set in the wp-config.php file:
WP_DEBUG: The core constant for debugging. When set totrue, WordPress displays all PHP errors, notices, and warnings on the screen. Example usage:
define( 'WP_DEBUG', true );
WP_DEBUG_LOG: When enabled, it writes all debug messages to adebug.logfile in the/wp-content/directory, without displaying them on the screen. This is useful for production environments where you don’t want to expose error details to users.
define( 'WP_DEBUG_LOG', true );
WP_DEBUG_DISPLAY: Controls whether debug messages are displayed in the HTML of pages. This can be disabled when usingWP_DEBUG_LOGto ensure errors are only logged.
define( 'WP_DEBUG_DISPLAY', false );
SCRIPT_DEBUG: Forces WordPress to use non-minified versions of core CSS and JavaScript files. This is crucial for debugging issues with the WordPress block editor or any JS-related functionality.
define( 'SCRIPT_DEBUG', true );
JETPACK_DEV_DEBUG: By disabling Jetpack dev debug mode on a local environment, you can access Jetpack-related articles for development/debugging.
define( 'JETPACK_DEV_DEBUG', false );
For more reference, please visit Debugging in WordPress.
c. Enabling Xdebug
Xdebug is a PHP extension that offers powerful debugging capabilities, such as breakpoints, stack traces, and performance profiling. It integrates with most modern IDEs like PhpStorm and Visual Studio Code.
Here’s a quick overview of Xdebug’s benefits for WordPress:
- Breakpoints: Set breakpoints in your PHP code, which pause execution at a specific line, allowing you to inspect variables, the call stack, and objects.
- Step Debugging: Step through your code line by line, helping you understand how it’s executing and where things may be going wrong.
- Profiling: Xdebug provides performance profiling, which outputs data that can be visualized using tools like Webgrind. This helps in identifying bottlenecks in your code, such as slow database queries or memory-heavy operations.
To enable Xdebug in a development environment:
- Install Xdebug (via
pecl install xdebugor through your package manager). - Configure your
php.ini:
zend_extension=xdebug
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_port=9003
- Configure your IDE to listen on the specified port and start debugging your WordPress application.
Redux DevTools for Gutenberg Block Development
Gutenberg uses the Redux state management library under the hood to handle the editor’s state. For developers working on custom blocks, understanding how state changes occur is critical. Redux DevTools is a browser extension that allows you to inspect, monitor, and time-travel through state changes in your Gutenberg blocks.
Here’s how Redux DevTools aids in Gutenberg block development:
a. State Monitoring
When building custom blocks, you may use the wp.data API to manage state, such as updating block attributes, handling block selection, or syncing data between blocks. Redux DevTools helps you see how this state changes in real time:
- State Tree: View the entire state of the editor at any point. This is particularly useful for debugging how your block’s attributes or inner states are managed.
- Action History: Redux DevTools tracks all dispatched actions, showing what actions have occurred, such as
UPDATE_BLOCK_ATTRIBUTESorSELECT_BLOCK. You can examine which actions were triggered when a user interacts with the editor, which can help in diagnosing issues related to user input or changes in block settings.
b. Time-Travel Debugging
One of the unique features of Redux DevTools is time-travel debugging. You can “rewind” the editor to a previous state and see how it looked at any given point in time. This is especially useful for:
- Testing State Changes: You can try different interactions, inspect how the state changes, then rewind and try again. This helps in ensuring that your block behaves as expected under different scenarios.
- Undo/Redo Analysis: Gutenberg’s editor supports undo/redo functionality. Redux DevTools can show you how state reverts or advances when these actions are triggered, allowing you to debug any issues related to the undo/redo process.
c. Action Comparison
Redux DevTools also allows you to compare different states before and after an action is dispatched. This is particularly helpful when debugging complex interactions in custom blocks that depend on multiple attributes or store interactions.
For example, when a user changes the alignment of a block, you can inspect the exact changes that were made to the state and compare the pre-action and post-action state trees.
Getting Started with Redux DevTools
- Install the Redux DevTools browser extension (available for Chrome, Firefox, etc.).
- Ensure that your environment supports Redux debugging by enabling
wp.datalogging:
wp.data.use( wp.data.plugins.logger );
- Open the DevTools, go to the “Redux” tab, and inspect the state, actions, and time-travel features.
Version control and compatibility
NEXT
Credits
Parth Vaswani
Author
Parth Vaswani
Author
Good Work. Good People.
Industry partnerships


Compliance certifications
United States
India
© rtCamp Inc. since 2009. All rights reserved.
Terms of Service · Privacy Policy · Trust Center
Company
Solutions
Subscribe to our newsletter and get a few email updates every month.
United States
India
© rtCamp Inc. since 2009. All rights reserved.
Terms of Service · Privacy Policy · Trust Center
Cookie Consent
We value your privacy
We use cookies to give you the best possible experience. By clicking “Accept,” you consent to our use of cookies to improve site functionality, analyze usage, and personalize content and communications. Your privacy matters to us, and we are committed to handling your data responsibly and transparently. Please check our Privacy Policy for more details.
Manage PreferencesDon’t AllowAllow All
Why do we use cookies?
×
By clicking "Accept" or "Decline All" at the bottom, you consent to the use of cookies and other tools as described in our Cookie Policy in accordance with your settings and accept our Terms of Service.
Toggle EssentialEssential
Essential cookies enable basic functions and are necessary for the proper function of the website.
Name
Description
Duration
Geolocation Config
This cookie is used to store the consent settings based on the visitor's location.
30 days
Cookie Preferences
This cookie is used to store the user's cookie consent preferences.
30 days
Toggle CloudFlareCloudFlare
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
Name
Description
Duration
cf_clearance
Whether a CAPTCHA or Javascript challenge has been solved.
session
Toggle CommentsComments
These cookies are needed for adding comments on this website.
Name
Description
Duration
comment_author
Used to track the user across multiple sessions.
Session
comment_author_email
Used to track the user across multiple sessions.
Session
comment_author_url
Used to track the user across multiple sessions.
Session
Toggle GodamGodam
GoDAM" is primarily a specialized WordPress plugin and media management service designed to enhance video hosting, marketing, and asset management directly within the WordPress dashboard.
Service URL: godam.io (opens in a new window)
Name
Description
Duration
user_image
Temporarily stores the path to the user's avatar or profile picture for quick rendering in the website header.
session
user_id
Stores the numerical ID of the logged-in user to maintain session continuity and basic site operations.
session
full_name
Stores the logged-in user's display name to personalize the site interface without needing database queries.
session
system_user
First-party cookie used to store basic application state identifying the current system user role.
session
sid
A generic session ID cookie used to maintain user state and functionality as the visitor navigates through the site.
session
Toggle Google reCAPTCHAGoogle reCAPTCHA
Google reCAPTCHA helps protect websites from spam and abuse by verifying user interactions through challenges.
Name
Description
Duration
_GRECAPTCHA
Google reCAPTCHA sets a necessary cookie (_GRECAPTCHA) when executed for the purpose of providing its risk analysis.
179 days
Toggle Google Tag ManagerGoogle Tag Manager
Google Tag Manager simplifies the management of marketing tags on your website without code changes.
Name
Description
Duration
cookiePreferences
Registers cookie preferences of a user
2 years
td
Registers statistical data on users' behaviour on the website. Used for internal analytics by the website operator.
session
Toggle StatisticsStatistics
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Toggle Factors AIFactors AI
Factors.ai is a B2B account intelligence and marketing analytics platform that helps Go-To-Market (GTM) teams identify anonymous website visitors, track buyer journeys, and measure the ROI of marketing campaigns.
Service URL: www.factors.ai (opens in a new window)
Name
Description
Duration
_fuid
It is sent to capture session details and track user behavior across your website to provide behavioral data and intent signals.
1 Year
Toggle Google AnalyticsGoogle Analytics
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
Name
Description
Duration
FPGSID
Stores a session or user identifier to track how visitors interact with a website. This helps Google Analytics measure website performance, user engagement, and usage patterns.
Session
FPLC
Used by Google Analytics to link visitor interactions and sessions across multiple related domains.
20 hours
FPID
A server-side Google Analytics cookie used as an alternative user identifier when third-party cookies are restricted.
2 years
_ga
ID used to identify users
2 years
_ga_
ID used to identify users
2 years
Toggle Jetpack StatsJetpack Stats
Jetpack's built-in visitor analytics. It records page views, referring sites, search terms, and outbound link clicks, and also carries the shared visitor-tracking library used by Jetpack Instant Search and WooCommerce Analytics.
Service URL: automattic.com (opens in a new window)
Name
Description
Duration
tk_aip
Stores a list of anonymous visitor IDs so they can be merged into one identity once a visitor is recognized.
Up to 5 years
tk_tc
Used once per page load to work out which cookie domain the Tracks library should use, then removed as soon as it's read back.
Session (deleted immediately after use)
tk_qs
Queues analytics events for Jetpack's Tracks library so none are lost if the page closes before they can be sent.
30 minutes
tk_ai
Stores a randomly-generated anonymous visitor ID so Jetpack's Tracks analytics library can link tracking events to the same visitor.
Session in wp-admin; up to 5 years on the frontend
Toggle Microsoft ClarityMicrosoft Clarity
Clarity is a web analytics service that tracks and reports website traffic.
Service URL: clarity.microsoft.com (opens in a new window)
Name
Description
Duration
CLID
Identifies the first-time Clarity saw this user on any site using Clarity.
12 months
ANONCHK
Indicates whether MUID is transferred to ANID, a cookie used for advertising. Clarity doesn't use ANID and so this is always set to 0.
Session
_clck
Persists the Clarity User ID and preferences, unique to that site is attributed to the same user ID.
12 months
_clsk
Connects multiple page views by a user into a single Clarity session recording.
12 months
Toggle Parse.lyParse.ly
Parse.ly is a content analytics platform that helps publishers optimize audience engagement and content performance.
Name
Description
Duration
cookies.js_dtest
This cookie determines whether the browser accepts cookies.
session
_parsely_session
JSON document storing information identifying a browsing session according to Parsely’s proprietary definition
30 minutes
_parsely_visitor
JSON document uniquely identifying a browser and counting its sessions
13 months
Toggle SalespanelSalespanel
Salespanel is a B2B marketing and sales software that identifies, tracks, and qualifies website visitors and leads in real-time using first-party data. It helps businesses monitor customer journeys, score leads based on behavior, and syncs this data with CRMs (like Pipedrive or HubSpot) to improve conversion rates.
Service URL: salespanel.io (opens in a new window)
Name
Description
Duration
track_uid
Identify and tracking a lead
12 moths
Toggle MarketingMarketing
Marketing cookies are used to follow visitors to websites. The intention is to show ads that are relevant and engaging to the individual user.
Toggle Bing / MicrosoftBing / Microsoft
Bing, powered by Microsoft, is a search engine providing web, image, video, and map search capabilities.
Name
Description
Duration
MR
Used to collect information for analytics purposes.
6 months
ANONCHK
Used to store session ID for a users session to ensure that clicks from adverts on the Bing search engine are verified for reporting purposes and for personalisation
10 minutes
SM
Used by Microsoft in synchronizing the MUID across multiple Microsoft domains to track users for advertising.
session
MUID
Identifies unique web browsers visiting Microsoft sites. These cookies are used for advertising, site analytics, and other operational purposes.
1 year
Toggle DoubleClick/Google MarketingDoubleClick/Google Marketing
A comprehensive digital advertising platform for managing campaigns, optimizing performance, and analyzing audience data.
Name
Description
Duration
IDE
This cookie is used for targeting, analyzing and optimisation of ad campaigns in DoubleClick/Google Marketing Suite
2 years
ar_debug
Store and track conversions
Persistent
Toggle LinkedInLinkedIn
LinkedIn is a professional networking platform for job seekers, employers, and industry connections.
Name
Description
Duration
bscookie
Used by LinkedIn to track the use of embedded services.
1 year
AnalyticsSyncHistory
Used to store information about the time a sync with the lms_analytics cookie took place for users in the Designated Countries
30 days
bcookie
Used by LinkedIn to track the use of embedded services.
1 year
li_sugr
Used to make a probabilistic match of a user's identity outside the Designated Countries
90 days
lidc
Used by the social networking service, LinkedIn, for tracking the use of embedded services.
1 day
UserMatchHistory
Used by LinkedIn Ads to synchronize and match user IDs across different ad networks and data providers.
30 days
Toggle LinkedIn InsightLinkedIn Insight
LinkedIn Insight is a web analytics service that tracks and reports website traffic.
Service URL: www.linkedin.com (opens in a new window)
Name
Description
Duration
li_sugr
Used to make a probabilistic match of a user's identity.
90 days
lidc
Used for routing and session management.
24 hours
Toggle LiveIntentLiveIntent
LiveIntent provides a platform for email advertising and identity-driven marketing solutions.
Name
Description
Duration
_lc2_fpi_js
Companion cookie to _lc2_fpi used by JavaScript to facilitate cross-domain ad tracking and user identification.
1 year
_lc2_fpi
First-party tracking cookie usually associated with LiveRamp to identify users across devices for targeted advertising.
1 Year
_li_ss
Sets a unique ID for the visitor, that allows third party advertisers to target the visitor with relevant advertisement. This pairing service is provided by third party advertisement hubs, which facilitates real-time bidding for advertisers.
1 month
lidid
Collects data on visitors' behaviour and interaction - This is used to make advertisement on the website more relevant. The cookie also allows the website to detect any referrals from other websites.
2 years
Toggle Cookie PolicyCookie Policy
You can find more information in our Privacy Policy.
Allow AllDecline All
Accept





