From efedd80561f37f13a89171956bd15c302f8a4789 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Thu, 25 Feb 2016 13:26:34 +0100 Subject: [PATCH] =?UTF-8?q?do=20not=20step=20into=20transpiled=20code=20if?= =?UTF-8?q?=20not=20mapped=20=E2=80=94=20don't=20update=20lastCallFrame?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pass vm explicitly --- .../src/org/jetbrains/debugger/DebugProcessImpl.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/DebugProcessImpl.kt b/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/DebugProcessImpl.kt index 71a78984d6d0..5b5a504456df 100644 --- a/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/DebugProcessImpl.kt +++ b/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/DebugProcessImpl.kt @@ -116,7 +116,8 @@ abstract class DebugProcessImpl>(session: XDebugSession, override final fun startStepInto() { updateLastCallFrame() - continueVm(if (vm!!.captureAsyncStackTraces) StepAction.IN_ASYNC else StepAction.IN) + val vm = vm!! + continueVm(vm, if (vm.captureAsyncStackTraces) StepAction.IN_ASYNC else StepAction.IN) } override final fun startStepOut() { @@ -136,11 +137,13 @@ abstract class DebugProcessImpl>(session: XDebugSession, continueVm(StepAction.CONTINUE) } + protected open fun continueVm(stepAction: StepAction) = continueVm(vm!!, stepAction) + /** * You can override this method to avoid SuspendContextManager implementation, but it is not recommended. */ - protected open fun continueVm(stepAction: StepAction): Promise<*>? { - val suspendContextManager = vm!!.suspendContextManager + protected open fun continueVm(vm: Vm, stepAction: StepAction): Promise<*>? { + val suspendContextManager = vm.suspendContextManager if (stepAction === StepAction.CONTINUE) { if (suspendContextManager.context == null) { // on resumed we ask session to resume, and session then call our "resume", but we have already resumed, so, we don't need to send "continue" message