ecourse template courses img cover 1

console.log Not Working in Captivate 12 and 13

The Problem

When Adobe released Captivate 12.x and 13.x, we noticed the JavaScript methods console.log(), console.warn(), and console.error() were simply not working when deployed to a web server. The culprit is inside the main.chunk.js file. Oddly, console.info() and console.debug() were working fine.

main.chunk.js
T = new URLSearchParams(window.location.search);
"production" === "production".trim() && "true" !== (null === (t = T.get("ENABLE_LOGGING")) || void 0 === t ? void 0 : t.toLowerCase()) && (console.log = console.warn = console.error = () => {});

Bottom line is that the JavaScript code mutes these methods if it can’t find ?ENABLE_LOGGING=true in the URL. It’s a great way to ensure the console stays clean in a production setting, but also a great way to drive Captivate developers crazy!

How To Turn it Back On

Add the ?ENABLE_LOGGING=true URL parameter to your course. So you’d access it like this:

https://mywebsite.com/course/index.html?ENABLE_LOGGING=true

This will allow all console.log messages to show up in the developer’s console in the browser.

Leave a Comment

Your email address will not be published. Required fields are marked *