How can I use the Profiler in the React Developer Tools to debug blocks in the WordPress block editor?
When trying to load the editor with the Profiler tab open (in Edge or Firefox), I get the following error :
Profiling not supported.
Profiling support requires either a development or production-profiling build of React v16.5+.
I’ve done all I think I can do to try to get it to work:
- Enabled React development mode with
define('SCRIPT_DEBUG', true)
- Set
process.env.NODE_ENV = 'development'
- Checked the version of react.js and react-dom.js:
v16.13
, bundled withWordPress 5.8
. - Tried different browsers (Edge and FF).
DevTools reports: This page is using the development build of React
, and the Components tab works.
So why doesn’t the Profiler work?
I’m trying to debug a block created with wordpress/create-block
. I can post node and webpack config files if anyone thinks it’s germane.
Much obliged for any help!