OutOfMemoryError (OOM).RegExp object.System.getContext().A product enhancement in version 9.1 introduced expanded data object debugging to allow properties to be inspected more deeply. While most standard variables use bounded serializers, RegExp and System.getContext() do not.
When these objects are in scope, the debugger falls back to a generic Java reflection-based mechanism. This mechanism recursively traverses the entire server object graph—including internal back-references to core infrastructure like the execution context and plugin factory—without a depth limit or output size cap. This recursive traversal continues until the JVM heap is exhausted, causing the hang or crash.
This is a known issue and is currently being tracked for a fix in a future release.
Avoid using the interactive "pause-and-inspect" debugger on scripts containing RegExp objects or System.getContext() calls.
Instead, use standard logging methods to inspect variables:
System.log("Variable value: " + variableName);System.debug("Variable value: " + variableName);These methods print the object properties directly to the workflow execution log without triggering the recursive serialization process.
Subscribe to this knowledge article to receive email notifications when there is an update to the issue.