-
-
Notifications
You must be signed in to change notification settings - Fork 403
[debug] Support breakpoints on sketch libraries #601
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
Comments
I was under the impression that #line directives are already added? At least the java IDE does so. IIUC the pro IDE uses arduino-cli to compile (whereas the java IDE uses arduino-builder which uses the legacy building code in arduino-cli), so maybe there is a difference between both compilation flows? Did you check the generated .ino.cpp file to see if there are indeed no line directives in there? |
The generated .ino.cpp does include the line directives, that's why setting breakpoints in the .ino file works out of the box. But additional .c / .cpp files used by the sketch are copied unchanged. |
Ah, I totally misread your report, sorry. Also see arduino/arduino-builder#323 which requests the same thing, and arduino/arduino-builder#325 which implements this in arduino-builder. Also, I would really like it if we could change the build process to not require these copies at all (so just compile files directly from the sketch directory, rather than printing them), but I think it is tricky to get right (especially wrt getting |
Closing as fixed by #1224 |
Bug Report
See https://github.com/arduino/arduino-pro-ide/issues/217 for a detailed description of the problem.
Cause of this problem:
The CLI copies sketch libraries to a temp folder and compiles them from there. With this approach, the source path included in the debugging information is in the temp folder, not the original sketch folder, so breakpoints set on files in the sketch folder are not considered.
Possible solutions:
#line
compiler directives to the copied files like it's done by the .ino preprocessor. These directives are understood by gcc so it uses the correct source paths in the debugging information.The text was updated successfully, but these errors were encountered: