if (pFrame == nullptr)
return E_FAIL;
+ ULONG32 currentIlOffset;
+ Modules::SequencePoint sp;
+ // GetFrameILAndSequencePoint() return "success" code only in case it found sequence point
+ // for current IP, that mean we stop inside user code.
+ // Note, we could have request for not user code, we ignore it and this is OK.
+ if (FAILED(m_sharedModules->GetFrameILAndSequencePoint(pFrame, currentIlOffset, sp)))
+ return S_OK;
+
ToRelease<ICorDebugFunction> pFunction;
IfFailRet(pFrame->GetFunction(&pFunction));
ToRelease<ICorDebugILFrame> pILFrame;
IfFailRet(pFrame->QueryInterface(IID_ICorDebugILFrame, (LPVOID*) &pILFrame));
- ULONG32 currentIlOffset;
- CorDebugMappingResult mappingResult;
- IfFailRet(pILFrame->GetIP(¤tIlOffset, &mappingResult));
-
ToRelease<ICorDebugValueEnum> pLocalsEnum;
IfFailRet(pILFrame->EnumerateLocalVariables(&pLocalsEnum));
}
}
- m_debugger.m_sharedProtocol->EmitStoppedEvent(StoppedEvent(StopPause, ThreadId::Invalid));
+ assert(threads.size() > 0);
+ // Event must provide thread (VSCode and MI/GDB protocols count on this), even if this thread don't have user code.
+ // Note, provide thread without user code also legit for this event.
+ m_debugger.m_sharedProtocol->EmitStoppedEvent(StoppedEvent(StopPause, threads[0].id));
m_debugger.m_ioredirect.async_cancel();
return S_OK;
}
return m_sharedDebugger->Continue(threadId);
} },
{ "pause", [this](const json &arguments, json &body){
+ // Ignore `threadId` argument, since only pause for all threads are supported now.
return m_sharedDebugger->Pause();
} },
{ "next", [this](const json &arguments, json &body){