microsoft / microsoft/vscode-cpptools

Remote Serial Debugging ESP8266

Open
#1,447 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugger help wanted
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.