File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- /*
1+ /*
22* Copyright (c) 2019. tangzx(love.tangzx@qq.com)
33*
44* Licensed under the Apache License, Version 2.0 (the "License");
@@ -334,6 +334,10 @@ void EmmyFacade::Hook(lua_State *L, lua_Debug *ar) {
334334 return ;
335335 }
336336
337+ // 没人断着时,把当前活跃 vm 记下来,使未断点过的 pause 能定位到目标
338+ if (!_emmyDebuggerManager.GetHitBreakpoint ()) {
339+ _emmyDebuggerManager.SetHitDebugger (debugger);
340+ }
337341 debugger->Hook (ar, L);
338342 } else {
339343 if (workMode == WorkMode::Attach) {
@@ -349,6 +353,9 @@ void EmmyFacade::Hook(lua_State *L, lua_Debug *ar) {
349353
350354 this ->transporter ->Send (int (MessageCMD::AttachedNotify), obj);
351355
356+ if (!_emmyDebuggerManager.GetHitBreakpoint ()) {
357+ _emmyDebuggerManager.SetHitDebugger (debugger);
358+ }
352359 debugger->Hook (ar, L);
353360 }
354361 }
You can’t perform that action at this time.
0 commit comments