Repository navigation
1.8.8-6: debugging by AI agents, program check - #1
Closed
NikolaiRadke wants to merge 9 commits into
Closed
NikolaiRadke wants to merge 9 commits into
NikolaiRadke wants to merge 9 commits into
Conversation
"ardudebug-bridge run" lets an AI agent stop the sketch at a line and read variables, "ardudebug-bridge serial" reads the Serial output for a fixed time. They work like agentuino-debug and agentuino-serial of Agentuino (same options, report and exit codes), but need no Node: the bridge is already in the board package. "run" starts the bridge a second time as GDB server, exactly as the IDE does, so the server code is unchanged. Without "run" or "serial" as first argument the bridge works as before (IDE, VS Code, Agentuino). skills/ardudebug/SKILL.md tells Claude Code and other agents how to find and use the commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
…erver Skill: call the bridge only with run or serial. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
Waits for a port that is not there yet, opens it again when it disappears while reading and sends the input again, and says so in the output. DTR and RTS are switched on as in the IDE's Serial Monitor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
Before, this was reported as a missing board package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
With the IDE's configuration (~/.arduinoIDE/arduino-cli.yaml) unless --cli-config is given. Skill updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
killOldBridges ended every other ardudebug-bridge.exe, including the "run" process waiting for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
platform.txt passes the debug build (ardudebug_elf, an argument of its own so paths may contain spaces). Once the stub answers, the bridge reads 17 chunks of flash through it and compares them with the ELF file. If they differ, it stops with an error instead of debugging another program, e.g. after an upload to another port. Without the argument (older platform.txt) nothing changes. run reports it as exit code 3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ardudebug-bridge run: stops the sketch at a line and reads variables, for AI agents on the command line (Claude Code, Codex, ...). Same options, report and exit codes as agentuino-debug, but no Node needed: the bridge is already in the board package. It starts the bridge a second time as GDB server, exactly as the IDE does.ardudebug-bridge serial: reads the Serial output for a fixed time, also during a debug session, and survives a board restart (Leonardo after a debug run).ardudebug-bridge --helpprints an overview instead of starting the GDB server.runtakes arduino-cli from the PATH, otherwise the one of the Arduino IDE.ardudebug_elf). Once the stub answers, the bridge compares 17 chunks of flash with the ELF file and stops with an error if the board runs another program. Without the argument (older platform.txt) nothing changes.runprocess that started it.skills/ardudebug/SKILL.md: skill for Claude Code.Without
run,serialor--helpas first argument the bridge works as before (IDE, VS Code, Agentuino).Tested
runwith and without debug build,--upload,--restore,--send,serialwith normal and debug build and during an IDE session, program check (same program, changed sketch, after upload).\rvs\n) with a breakpoint before changing the code.runwith the IDE's arduino-cli,serial.Not tested: Mega, macOS.
Generated by Claude Code