The IDE has no packets that are sent to lldb-vscode that say which thread and frame are selected. The only way we know is we get a request for variables for a stack frame via a "scopes" request. When we receive this packet we make that thread and frame the selected thread and frame in lldb. This way when people execute lldb commands in the debug console by prefixing the expression with the backtick character, we will have the right thread and frame selected. Previously this was not updated as new stack frames were selected.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I agree with the implementation.
I also find no way notify the IDE that the user has switched to a different thread or frame in the console, and I actually think it's better this way.
lldb/test/API/tools/lldb-vscode/console/TestVSCode_console.py | ||
---|---|---|
21 | just use lldb_command instead of using a formatted string | |
57 | frame #0 | |
58 | select |
lldb/test/API/tools/lldb-vscode/console/TestVSCode_console.py | ||
---|---|---|
21 | I didn't notice the backtick. Forget about this |
commit 5998aceda9fdca04db4d9ee390cec660896bf0bf (HEAD -> master, origin/master, origin/HEAD)
Author: Greg Clayton <gclayton@fb.com>
Date: Thu Apr 2 16:30:33 2020 -0700
Have lldb-vscode update the currently selecte thread and frame when it receives a "scopes" request. Summary: The IDE has no packets that are sent to lldb-vscode that say which thread and frame are selected. The only way we know is we get a request for variables for a stack frame via a "scopes" request. When we receive this packet we make that thread and frame the selected thread and frame in lldb. This way when people execute lldb commands in the debug console by prefixing the expression with the backtick character, we will have the right thread and frame selected. Previously this was not updated as new stack frames were selected. Reviewers: labath, aadsm, wallace, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D77347
looks good
lldb/test/API/tools/lldb-vscode/console/TestVSCode_console.py | ||
---|---|---|
22 | if you used self.assertIn(contains_string, output, assertmsg), then you wouldn't need to repeat the arguments in the assert message. |
just use lldb_command instead of using a formatted string