From 2dd1692215b4449cb78c4f60a7ea7534682ad3ba Mon Sep 17 00:00:00 2001 From: Egor Ushakov Date: Fri, 8 Nov 2024 19:09:18 +0100 Subject: [PATCH] [debugger] no need to compute text if debug logger is not enabled GitOrigin-RevId: 4b5c1ff6c4fec130edc05b84968dd04eaaeeda57 --- .../debugger/engine/events/SuspendContextCommandImpl.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/events/SuspendContextCommandImpl.kt b/java/debugger/impl/src/com/intellij/debugger/engine/events/SuspendContextCommandImpl.kt index f331b89c1f45..1ad4e9cc2819 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/events/SuspendContextCommandImpl.kt +++ b/java/debugger/impl/src/com/intellij/debugger/engine/events/SuspendContextCommandImpl.kt @@ -38,7 +38,9 @@ abstract class SuspendContextCommandImpl protected constructor(open val suspendC } invokeWithChecks(suspendContext) { - LOG.debug("Executing suspend-context-command: $this") + if (LOG.isDebugEnabled) { + LOG.debug("Executing suspend-context-command: $this") + } contextActionSuspend(suspendContext) } check(resetContinuation(null) == null) { "Continuation is not null after resume" }