-
Notifications
You must be signed in to change notification settings - Fork 313
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
Bugfix/debugging docs #1131
Bugfix/debugging docs #1131
Conversation
Download the artifacts for this pull request: |
09e2ef7
to
af61719
Compare
56c6cf4
to
110b256
Compare
110b256
to
2ecf21b
Compare
Hi there!
Any suggestion on what I might be doing wrong, or perhaps a bug that occurs? Regards, |
@TheHexaCube Hi Daniel thank you for your feedback. You are still using the old debug adapter. Please update your {
"configurations": [
{
"type": "gdbtarget",
"request": "attach",
"name": "Eclipse CDT Remote",
"program": "${workspaceFolder}/build/${command:espIdf.getProjectName}.elf",
"initCommands": [
"set remote hardware-watchpoint-limit 2",
"mon reset halt",
"maintenance flush register-cache",
"thb app_main",
],
"gdb": "${command:espIdf.getXtensaGdb}",
"target": {
"port": "3333"
},
}
]
} |
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.
There are some commented lines of code which I've notice.
Other than that LGTM! Tested it on Linux (Fedora 39)
Hi Brian, The debugger seems to work fine now, however I noticed that the peripheral values don't update "automatically" whenever the debugger stops at a breakpoint (or is manually stopped), instead I have to "close and open" the registers for them to update. Thanks for your help, I really appreciate it and the update itself! Best regards |
Thanks for the feedback. The peripheral tree view values open/close trigger a read memory request to GDB, I think having too many read request on each breakpoint stop will provide a slower debugger experience and since it is just a memory address we don't know which specific peripheral value has changed for a given step. I'm not sure if it would be a good approach to read all on each stop event or allow the user to enable such as a feature. What do you think @TheHexaCube ? |
Hey Brian! Alternatively I think at least allowing a user to configure a "update all on breakpoint" would be a fair decision, especially if the performance impact would be mentioned in the docs, and also would be turned off by default. I personally feel like having to open/close the view on every breakpoint, when trying to debug a peripheral, is sort of cumbersome aswell, so at least an option would be nice in my eyes |
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.
LGTM except for the console.log I've commented about
Actually I tested again with updating values on debug stop event (which I added to this PR) and doesn't seems to trigger many readMemory requests. If you don't mind please try the updated VSIX installer @TheHexaCube |
I've tried a multi_config example with this vsix version following the steps outlined here using selecting any config, build and flash work so far as outlined in multi_config - I uploaded a snapshot . my open questions:
thanks in advance, Michael |
I kind of got this working with dual targets by using explicitly customized debug launch configs - not sure this is the way how it is supposed to be done switching between targets of different archs requires vscode restart, seems some openocd config values are cached and not reread? maybe we can mutate this example into a reference for how it should be done - learning curve and amount of custom incantations is still staggering the new debug adapter is much better, and the Native Debug extension is a working alternative as reference opening a terminal before debugging sends things haywire once debugging starts, but that looks more like the fickle USB hardware - the only variant working is start debugging, start terminal without touching DTR I am still at loss regarding question 3 and 4 |
So the project configuration settings override some of the settings from extension settings as described in the project configuration. This allow to have multiple build flash configuration as the multi_config ESP-IDF example. It doesn't override IDF_PATH and tools settings because it is intended to generate multiple builds for same ESP-IDF version.
The project configuration editor modifies some of the existing parameters like build arguments. If you take a look at these profiles they are basically build arguments About how to debug with these multiple project configuration: I think the missing part is to update Let me know how it goes. |
08c3f76
to
5671403
Compare
@brianignacio5 hi ! Tested under: Followed debug doc from https://github.com/espressif/vscode-esp-idf-extension/blob/bugfix/debugging-docs/docs/tutorial/debugging.md Was able to run debug and repeat all steps from docs. Only thing I think we should add to make it easier for user to navigate is just to modify illustrations a bit like this What do you think ? Also it would be nice if you could fix this comma typos. Caz users probably gonna copy all the setting from the our docs and they hope that this will work :) |
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.
@brianignacio5 Thanks for working on the new debug adapter. Lastly, I had time to play with existing debug adapters. For me, the most crucial part is to see what is going on in the background. When users come up with an issue, we ask OpenOCD for verbose logs in a file. So IMO, it should be easy to have it, and needs to be mentioned somewhere in the debugging.md
Maybe it is related to the espidf
debug adapter but I couldn't manage to get it to work when I increased the adapter log level. It gets too slow and the debug session never starts.
I wanted to share my experience so I left some comments. If I can find a time, I would also like to test and see how it works.
fix doctor cmd test test node 16 try node 18 remove out delete try rm set output modify github output another try at test result test again rm comment code
5671403
to
ad7a107
Compare
Hi, I just found this change while struggling as usual with the awful debugger, and on checking the docs noticed the new recommendation to use Eclipse CDT GDB Adapter. So I switched debug adapter from ESP-IDF Debug Adapter to Eclipse CDT GDB Adapter. This is a HUGE improvement and can't be understated !! Thank you !! |
Description
Update documentation regarding debugging using other extensions and now using Eclipse CDT GDB
Fixes #918
Fixes #1164
Fixes #1138
Fixes #1168
Fixes #1177
Type of change
Steps to test this pull request
New debugging should work faster and better than previous debug adapter.
Debugging experience should be the same as debugging tutorial.
How has this been tested?
Test running the debugging tutorial.
Test Configuration:
Dependent components impacted by this PR:
Checklist