PlatformIO Community

PIO Unified Debugger

We don’t turn on it by default. Your trial period starts when you create PIO Account which is required only for PIO Plus features.

Sorry, I never replied to this,

I have been using it successfully for many months now. Thank you for making those changes, it has been an invaluable tool in my development. Using Atom it worked perfectly without any installations, just pressed the debugging button and it worked.

Thanks again for all your hard work!

1 Like

Hi, would you also add support for the Heltec WiFi Kit 32?

Please file a feature request here

do you plan on supporting megaatmega2560:

Sorry, currently we don’t plan to support AVR :frowning:

Seems like a silly response considering the $10/month revenue stream from most of the user base. Sure I do some mbed, but most of my work is avr.

Sure I am an older programmer that is quite used to going without one… But it sure would be handy. I am sure I am not alone here.

Board lolin32 seems to be unsupported by the debugger. Any chance to get it working?

Which price model could work for you from your point of view?

The price is not really a consideration at this point. The only item on the list that I would be interested in is a debugger and is just not available for the platform I mostly use.

Implementing a debugger on a platform that wasn’t designed for one…that’s a task.

I can’t get the debugger to work on Teensy 3.6 under VSCode on macOS. Any idea what I did wrong?

SEGGER J-Link GDB Server V6.30e Command Line Version
JLinkARM.dll V6.30e (DLL compiled Feb 23 2018 13:15:46)
Command line: -singlerun -if SWD -select USB -device MK66FX1M0xxx18 -port 2331
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: yes
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: MK66FX1M0xxx18
Target interface: SWD
Target interface speed: 4000kHz
Target endian: little
Connecting to J-Link…
Connecting to J-Link failed. Connected correctly?
GDBServer will be closed…
source .pioinit
Shutting down…
Running executable
undefinedCould not connect to J-Link.
Please check power, connection and settings.

Do you have external debugger?

I don’t know! I am not sure what you mean. Is this part of PlatformIO?

Teensy boards don’t have on-board debuggers and require external tools/probes. Currently, we have pre-configured settings for J-Link tool:

No I don’t have a hardware debugger/probe.

I’ve just started using PlatformIO on a Ubuntu setup with Visual Studio Code.

I cannot get the debugger working in Visual Studio Code.

I’m working with a ST Link Nucleo device (nucleo_l476rg). I can run and deploy my project to the device successfully.

As I set a breakpoint and start the debugger via the VS Code debug dialog, it fails with a popup complaining that the preLaunchTask quit with return code 1.

This is what the debug console shows:

source .pioinit
GNU MCU Eclipse 64-bits Open On-Chip Debugger 0.10.0+dev-00392-gbe9ef0b0 (2018-01-12-14:56)
Licensed under GNU GPL v2
For bug reports, read
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 500 kHz
adapter_nsrst_delay: 100
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : clock speed 480 kHz
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
Error: open failed
in procedure 'init’
in procedure ‘ocd_bouncer’

.pioinit:1: Error in sourced command file:
Remote communication error. Target disconnected.: Connection reset by peer.
.pioinit:1: Error in sourced command file:
Remote communication error. Target disconnected.: Connection reset by peer.
Running executable

This is the debug configuration that PlatformIO created automatically within VS Code.

“version”: “0.2.0”,
“configurations”: [

        "type": "gdb",
        "request": "launch",
        "cwd": "${workspaceRoot}",
        "name": "PlatformIO Debugger",
        "target": "/home/polarapfel/Source/IoT/HelloWorldBlink/.pioenvs/nucleo_l476rg/firmware.elf",
        "gdbpath": "/home/polarapfel/.platformio/penv/bin/piodebuggdb",
        "autorun": [ "source .pioinit" ],
        "preLaunchTask": "PlatformIO: Pre-Debug",
        "internalConsoleOptions": "openOnSessionStart"


Any idea how to get that resolved?


Did you install ?

That helped. The debugger starts and execution stops at breakpoints I set.

But one thing puzzles me. I don’t see the variables values in the debugger. They are never populated. I created a bunch of variables in different scopes just to be sure, none of them show up in the debugger.

Other than the call stack, nothing shows in the debugger. Is this normal?

Do you mean global variables? That is the issue of GDB. You HAVE TO watch them. Just move cursor to the variable and you should see the value. Right click > Watch variable.