-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Implement official Arduino IDE debugger API #9116
Conversation
👋 Hello pillo79, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
Nice! |
@pillo79 could you also backport this to |
@me-no-dev thanks for looking. Sure, will do! 👍 |
981c171
to
16d4c61
Compare
I edited descriptions only, but rebasing to current master (60395ed) I apparently picked up something that causes a build error. I will revert to the previous branch point for the CI to complete. |
16d4c61
to
2664825
Compare
Use regexs to replace all occurrences of `{runtime.platform.path}` with the correct `{runtime.tools.*.path}`, regardless of directory separator, and remove dependency on specific text around each path. Note that the order has been changed to ensure that the longest paths are replaced first, to avoid replacing parts of other paths.
Ensure Windows paths properly use a backslash as folder separator.
Implement sketch debugging according to the official Arduino Platform Debug Specification [1]. The biggest improvement is that now `launch.json` can be fully customized by the core (including the type of each entry), so there is no need to copy files in the sketch folder. In particular, `debug_custom.json` is not used anymore. [1] https://arduino.github.io/arduino-cli/latest/platform-specification/#sketch-debugging-configuration BREAKING CHANGE: This commit requires Arduino IDE 2.3.0 or later to use the debugging features. Older versions will no longer be able to start a debug session successfully.
Cortex-debug requires objdump to be in the same folder as gdb, or needs the full path to the executable in the `launch.json` file. This is now possible with the new debugging API.
If the `debug.executable` variable is null or unset, the Debug button appears grayed out. The new IDE also takes current parameters into account, allowing to conditionally enable the Debug button only when some conditions are met.
2664825
to
272a0a5
Compare
Fixed a quote-related escaping issue (my personal favs 😅) and also included a small addition to |
Direct link: https://www.arduino.cc/en/software#nightly-builds |
Internal tests have completed successfully so marking it ready for review. |
IDE 2.3 has been released yesterday 👍 |
Hello @cristiancardosodexcom, what is the version of the core you are using? Is that on a Mac? |
Version: 2.3.2 Copyright © 2024 Arduino SA Yes it's a MAC. |
Description of Change
This PR replaces the current experimental sketch debugging description with a full implementation according to the finalized Arduino Platform Debug Specification.
The current experimental debug configuration will no longer be supported with the release of Arduino IDE 2.3.0.
The biggest improvement is that now the contents of
launch.json
can be fully customized from entries inplatform.txt
, so there is no need to copy files in the sketch folder and advanced customizations become possible.In particular,
debug_custom.json
is not used anymore.Tests scenarios
Tested on Arduino Nano ESP32 with current nightly IDE, available from here in the Nightly Builds section, or 2.3.0+ when it becomes public.