The field ‘totalFrames’ which is total number of frames available, is mandatory in StackTraces response for VSCode extension that implements DAP and declares capability 'supportsDelayedStackTraceLoading':

"The debug adapter supports the delayed loading of parts of the stack,
which requires that both the 'startFrame' and 'levels' arguments and the
'totalFrames' result of the 'StackTrace' request are supported."

Lack of this field makes VSCode incorrectly display stack traces information

D71034
This commit is contained in:
Serhiy Redko
2019-12-07 20:11:35 -08:00
committed by Nathan Lanza
parent d0ccd55151
commit 6dad5e441d
3 changed files with 29 additions and 7 deletions

View File

@@ -2166,6 +2166,8 @@ void request_stackTrace(const llvm::json::Object &request) {
break;
stackFrames.emplace_back(CreateStackFrame(frame));
}
const auto totalFrames = thread.GetNumFrames();
body.try_emplace("totalFrames", totalFrames);
}
body.try_emplace("stackFrames", std::move(stackFrames));
response.try_emplace("body", std::move(body));