question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dropped 'gdb' connection

See original GitHub issue

Environment:

OS: Windows 10, 11, MacOS (tried in all) Visual Studio Code Native Debug version v0.26.0 OpenOCD session running in background Hardware ESP32 JTAG hardware ESP-prog

Issue:

My debugging environment stops working after updating to v0.26.0. When starting a session openocd reports gdb session as dropped. After reverting to v0.25.1 it works as usual.

Copy of launch.json

{
  "version": "0.2.0",
  "configurations": [

    {
      "type": "gdb",
      "request": "launch",
      "name": "Flash and Debug Jlink",
      "target": "./build/ninja-fiw.elf",
      "cwd": "${workspaceFolder}",
      "gdbpath": "xtensa-esp32-elf-gdb",
      "autorun": [
        "target remote :3333",
        "mon reset halt",
        "flushregs",
        "thb app_main",
        "c"
      ]
    }
  ]
}

If submitting a bug please make sure

  • If you are using gdb
    • gdb --version >= 7.7.1
    • it works on the command line with gdb
    • cwd and target are properly set
  • If you are using lldb
    • lldb --version >= 3.7.1
    • it works on the command line with lldb-mi
    • cwd and target are properly set

Screenshots are helpful but not required

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
abgironnecommented, May 3, 2022

I have the same problem using the esp32 and I can confirm that using type “attach” instead of type “launch” resolved it for me and everyone here.

1reaction
higaskicommented, Jul 10, 2022

Using the old configuration

      "stopAtEntry": "app_main",
      "autorun": [
        "mon reset halt",
        "thb app_main",
        "flushregs"
      ],

this now works yes. The only time I can still trigger the “dropped connection” message is by trying to restart the target (green circle arrow button).

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenOCD "Dropped 'gdb' connection"
Hello All, I am attempting to establish connections with my STM32H753I-EVAL2 evaluation board through OpenOCD on Eclipse.
Read more >
How to solve "dropped 'gdb' connection" error in Eclips - Mbed
How to solve "dropped 'gdb' connection" error in Eclips. Hello everyone. I'm facing a problem wtih Nucleof429zi board with Eclips and ubuntu ...
Read more >
OpenOCD/GDB connection is dropped on startup (OCD-380)
OpenOCD/GDB connection is dropped on startup (OCD-380) #164 ... at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Read more >
Unable to debug with STM32CubeIDE after upgrading stlink ...
When using ST-Link GDB Server, STM32CubeIDE insists on updating Stlink firmware to the latest version ... Info : dropped 'gdb' connection.
Read more >
Topic: dropped 'gdb' connection (error -400) - Sysprogs
Info : Listening on port 54462 for gdb connections target halted due to debug-request, ... Info : dropped 'gdb' connection (error -400).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found