-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Keep sub-entries expanded when stepping through code #97
Comments
I'm not seeing the same behaviour. Can you supply a reproduction (including nvim-dap config/adapter settings)? |
Whoops, should have been more clear with a reproduction 😅
I've tested with 2 adapters. The original one was lldb-vscode, with the following: adapter settingsdap.adapters.lldb = {
type = "executable",
command = "/usr/bin/lldb-vscode",
name = "lldb",
} and configdap.configurations.cpp = {
{
name = "Launch",
type = "lldb",
request = "launch",
program = vim.fn.getcwd() .. "/binary",
cwd = vim.fn.getcwd(),
stopOnEntry = false,
},
}
Additionally, I also decided to test with debugpy: (adapter settings)dap.adapters.python = {
type = "executable";
command = "/usr/bin/python3";
args = { "-m", "debugpy.adapter" };
} (config)dap.configurations.python = {
{
type = "python";
request = "launch";
name = "Launch file";
program = "${file}";
pythonPath = "/usr/bin/python"
},
} With debugpy, I observed a different behavior: while sub-entries don't get collapsed when stepping, they also don't get updated, needing to be manually closed and opened to become so. To reproduce this issue, you can create a simple python file, e.g. rows = 3
cols = 2
b = [[1, 2], [2, 1], [0, 1]]
for i in range(rows):
for j in range(cols):
b[i][j] += 1 Set a breakpoint at the last line, watch 'b' (expanding its members) and step with |
OK I've fixed the issue for Python anyway and believe it'll fix the lldb-vscode. Let me know if not 😄 |
Hey, thanks for fixing the issue with debugpy! Unfortunately, I'm still having the issue with lldb-vscode :( I can record a demo if you think that it would be helpful. |
This seems to fix an issue in lldb-vscode where a variable response would be empty despite the variable having children. See #97 for details. As a consequence of this fix, the fix from the previous commit is unnecessary and is undone.
OK I don't use C++ but managed to reproduce it with Rust (forgot they used the same adapter). I believe this is actually an lldb issue but managed to find a workaround. Please try the latest commit |
Apparently it's working but I still want to investigate a little further. I think under some circunstances a visual glitch may happen where a collapsed entry expands, overlaping with the actually expandend entries (I'm unsure how to reproduce this). Feel free to close this issue though, as I think this behavior is unrelated and the main problem I had was solved. Thanks for the amazing job :)
Should I file a bug report on llvm's repo? |
If you turn on nvim-dap debug logs and see it happen again, I should be able to spot the cause. Happy to keep open for a while anyway.
You could but it's a weird bug and I didn't try reproducing with the CLI (which I imagine they'll want). I wasn't able to reproduce with VSCode either. The issue occurring was that the adapter was responding to the |
I've managed to find a way to reproduce the aforementioned visual glitch:
|
Thanks for that, I was able to reproduce. I haven't had the time to figure out the issue but will take a look when I can |
Restoring previous fix to avoid issues with re-used variable refs (as done by clangd). This points to a broader issue in the design where variable references should not be maintained across frames as they are not guaranteed to be consistent. See #97
OK should be working now 😅 |
Everything is working perfectly now, thank you! |
Stepping collapses sub-entries, eg
becomes
The text was updated successfully, but these errors were encountered: