Logging traces of what is happening in user interfaces is critical both during development and as a part of production support. Apex Designer makes it easy to consistently add logging to your pages, components, and services.
Debug Basics
To learn more about the debug npm module, adding debug in a code block, and debug string format, please review the Debugging Behaviors page.
Browser Log Filtering
While debug is a powerful module, Apex Designer provides a set of shortcut functions for debugging in the browser javascript console to help you quickly see the logs you need and avoid the noise of extra logs.
The following helpers are available starting in Angular Base Library 14.0.33. If they don't appear in the browser javascript console immediately after upgrade, you may need to click the "Build Application" icon in the App Manager dialog for a fresh build.
The following do not require a page refresh to take effect:
debug.all() - Start viewing all debug logs
debug.reset() - Turn off debug logs
debug.add.MyComponentName() - Appends the component's debug string to the current debug string
debug.remove.MyComponentName() - Remove the component's debug string from the current debug string
debug.push(debugString) - Appends the debugString to your current debug settings
debug.pop() - Removes the most recently added debug string
debug.removeDebugString(debugString) - Removes debugString from the current debug string
debug.set(debugString) - Overrides any existing debug string and sets it to debugString
debug.contains(debugString) - Runs debug.set(`*${debugString}*`) to show any logs containing the given debugString
debug.current() - Sets the debug string to show logs for every component loaded in the current browser
debug.currentPage() - Like debug.current, but excludes logs from the toolbar and left nav
debug.query(domQueryString) - Shows logs for all components associated with DOM elements matching document.querySelectorAll(domQueryString)
debug.pause() - Stop debugging and retain the current debug string
debug.resume() - Start debugging with the previously paused debug string
debug.save(key) - Save your current debug string to be used later
debug.load(key) - Updates the current debug string to a previously saved debug string