microsoft / microsoft/vscode-cpptools
Remote Serial Debugging ESP8266
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
I would like to know how to get remote serial debugging working with ESP8266 devices. Seems like there should be a way to make this work, but I haven't found it yet. When I start debugging VSCODE is trying to launch the elf file locally on my PC. What I want is for VSCODE to start the local GDB debugger. Below is my launch.json file. Is there something wrong in my launch file?
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "cppdbg",
"request": "launch",
"program": "d:/dev/src/homeauto/sonoff/app/bin/esp8266/sonoff.elf",
"cwd": "d:/dev/src/homeauto/sonoff/app",
"miDebuggerPath": "d:/dev/arduino-1.8.5/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gdb.exe",
"MIMode": "gdb",
"setupCommands": [
{ "text": "file d:/dev/src/homeauto/sonoff/app/bin/esp8266/sonoff.elf" },
{ "text": "set remotelogfile d:/dev/src/homeauto/sonoff/app/gdblog.txt" },
{ "text": "set serial baud 115200" },
{ "text": "set remote hardware-breakpoint-limit 1" },
{ "text": "set remote hardware-watchpoint-limit 1" },
{ "text": "target remote com4" }
],
"externalConsole": false,
"visualizerFile": "d:/dev/src/homeauto/sonoff/app/.vscode/stl.natvis"
}
]
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the launch.json configuration in the issue, especially the cppdbg request, miDebuggerPath, setupCommands, and target remote com4 entry. Review the extension's remote-debugging behavior and determine whether the requested ESP8266 workflow is supported; done means the local GDB debugger can attach to the device without trying to launch the ELF locally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, vscode
- Domain
- devtools, embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100