-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The result of GDB -exec evaluate request in all contexts is printed in debug console. #1236
Comments
I'm not an expert but from looking at the code it looks like this is the place that is responsible: MIEngine/src/MIDebugEngine/Engine.Impl/Variables.cs Lines 504 to 517 in a76754b
Only EngineUtils.IsConsoleExecCmd is checked here while probably dwDAPFlags should've been checked here as well after appropriate flags were added to DAPEvalFlags here:MIEngine/src/DebugEngineHost.Stub/Shared/Microsoft.VisualStudio.Debugger.Interop.DAP.cs Lines 10 to 20 in a76754b
that correspond to the EvaluateArguments.ContextValue created here:MIEngine/src/OpenDebugAD7/AD7DebugSession.cs Line 2491 in a76754b
which should've probably be converted to DAPEvalFlags in this block as it is done with CLIPBOARD_CONTEXT :MIEngine/src/OpenDebugAD7/AD7DebugSession.cs Lines 2591 to 2598 in a76754b
|
FYI, I'm willing to work on a PR addressing this issue. |
We also have seen this behavior when working on an extension to enhance the debug session. |
We will be shipping this in the next VS Code Release 1.12.1 |
When
vscode.DebugSession.customRequest('evaluate', ...)
is called for expression starting with-exec
the result is printed in debug console no matter what context was specified. It is not returned to the caller inDebugProtocol.EvaluateResponse.result
. On the other hand if it doesn't start with-exec
it is returned to the caller even if the context is'repl'
.How to reproduce:
In vscode extension,
registerDebugAdapterTrackerFactory
, defineonDidSendMessage
and catch'stopped'
'event'
. Then getthreadId
and execute'stackTrace'
request to getframeId
. Then call:with GDB and
name
being some identifier in C++ program.The text was updated successfully, but these errors were encountered: