Toggle Debug Mode for CEP Panels

Adobe CEP panel devs constantly need to switch the player debug mode on for building tools, and off for testing them. This usually means editing the registry on Windows or running a terminal command on Mac for each CEP / CEF version which can get pretty cumbersome.

So, I came up with a script to scan for all installed CEP versions on the system, and then toggle them on or off at once:

You can run this function in any Node.js environment. If you’re using a task runner like Gulp, you can easily add it to a Gulp task:

and run it from the command line with:

gulp debugon
gulp debugoff

If you’re not using a task runner, you can save the function in a file named debug.js in the root of your repo with this call statement at the end:

And then add it to your node scripts in your package.json:

and then you can run it simply with

yarn debugon
yarn debugoff

Now with one command you can easily toggle Player Debug Mode on and off for all CEP versions during testing.

Happy Debugging!