-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add Debug Context Selector #1
Conversation
eb25f0b
to
c472173
Compare
src/plugin/memory-storage.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel comfortable with the undefined in the readMemory (line 73 below) but it felt like I was changing too many functions which is what these more surgical changes were supposed to avoid (instead of adding Context to readArguments).
1cc2bce
to
dc5df23
Compare
Since the ReadMemory/WriteMemory may be dependent upon the DAPs, move into the adapter-capabilities.ts file. Signed-off-by: Thor Thayer <[email protected]>
dc5df23
to
25ce242
Compare
readMemory?(session: vscode.DebugSession, params: ReadMemoryArguments, context: Context): Promise<ReadMemoryResult>; | ||
|
||
writeMemory?(session: vscode.DebugSession, params: WriteMemoryArguments, context: Context): Promise<WriteMemoryResult>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other cases, the context is optional; why is it required here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops. Good catch. Thanks!
|
||
protected showContexts = () => { | ||
if (this.props.contexts.length === 0) { | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined
would be more natural here.
Populate the Context Dropdown from the different debug Contexts if available so different DAPs can be addressed. Add an optional Context to queries so the query can be directed to the appropriate handler. Add support for cdt-amalgamator. Signed-off-by: Thor Thayer <[email protected]>
Match current context id with one of the elements of the Contexts array. Signed-off-by: Thor Thayer <[email protected]>
Add new conditional for context menu showing Memory Inspector for a variable because some DAPs may not support it. Signed-off-by: Thor Thayer <[email protected]>
25ce242
to
a80eb95
Compare
Since this is a local draft PR, I'm closing it. |
Since this is a local draft PR, I'm closing it. See upstream PR: |
What it does
This PR addresses Issue 67.
In a system with multiple children such as the
cdt-gdb-amalgamator
, the Memory Inspector needs a way to select the correct context (as thecdt-gdb-vscode
Memory Browser does).This PR has a dependency on
cdt-gdb-amalgamator
PR 20 which puts the assignment of the Child IDs in thecdt-gdb-amalgamator
instead of the Memory Inspector and also uses thereadMemory
since the data returned is in the correct format for Memory Inspector.How to test
Run this branch of the
vscode-memory-inspector
with the mainlinecdt-gdb-vscode
andcdt-gdb-adapter
along with the modifiedcdt-gdb-amalgamator
in PR 20](eclipse-cdt-cloud/cdt-amalgamator#20).Start the debugger as a Desktop Extension. In the newly launched VSCode, open the cdt-amalgamator/sampleWorkspace folder and place a breakpoint at the first instruction in empty1.c's main and empty2.c's main. Start debugging with
Amalgamator Example
and you should run to the breakpoints. Open a new Memory Inspector with the Command Palette'sMemory: Show Memory Inspector
to open a new view. The dropdown should list bothproc1
andproc2
listed in the Call Stack.Review checklist
Reminder for reviewers