Minor fix for debugger

* debugger always stops at the start of new Script execution
* BreakpointLocationsInfo is added to debugger when Escargot generates bytecode for execution only

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
HyukWoo Park 2022-04-14 20:30:22 +09:00 committed by Boram Bae
commit 02aac43bcf
3 changed files with 10 additions and 4 deletions

View file

@ -479,6 +479,10 @@ Value Script::execute(ExecutionState& state, bool isExecuteOnEvalFunction, bool
Value resultValue;
if (LIKELY(!m_topCodeBlock->isAsync())) {
#ifdef ESCARGOT_DEBUGGER
// set the next(first) breakpoint to be stopped in a newer script execution
context()->setAsAlwaysStopState();
#endif
resultValue = ByteCodeInterpreter::interpret(codeExecutionState, byteCodeBlock, 0, registerFile);
clearStack<512>();