Finally, PIO Unified Debugger comes to VSCode!

We are pleased to announce a huge update :fire: for PlatformIO IDE for VSCode which brings a new polished and modern user interface for PIO Unified Debugger. You can’t imagine but with PIO Unified Debugger you don’t need to know how to prepare your hardware for debugging. Other IDEs require to prefill a lot of debugging settings, install special software which can differ between development boards, read long tutorials…

:rocket: PIO Unified Debugger is the unique solution on the market. Just a “1-click” on “Debug” button and VSCode will be magically converted from a text editor to a powerful development environment with the rich debugging instruments:

:heavy_check_mark: Conditional Breakpoints
:heavy_check_mark: Expressions and Watchpoints
:heavy_check_mark: Generic Registers
:heavy_check_mark: Peripheral Registers
:heavy_check_mark: Memory Viewer
:heavy_check_mark: Disassembly
:heavy_check_mark: Multi-thread support
:heavy_check_mark: A hot restart of an active debugging session

PIO Unified Debugger works on Windows, macOS, Linux and supports more than 200+ different boards and the most popular architectures, such as ARM, Espressif 32, RISC-V, and MSP430.

You can easily switch between different architectures, MCUs, boards, operation systems and keep the same workflow.

Get PlatformIO IDE for VSCode

Demo

  • Arduino and IoT
  • ARM mbed RTOS
  • Espressif 32 and ESP-IDF (RTOS)
  • RISC-V, SiFive Freedom E SDK

** Official support for ESP32 and RISC-V will be announced later. Stay tuned with us at PlatformIO_Org.

Arduino and IoT

ARM mbed RTOS

Espressif 32 and ESP-IDF (RTOS)

RISC-V, SiFive Freedom E SDK


Regards,
The PlatformIO Plus Team

4 Likes

YES YES YES YES! Thank you for the disassembly view!
Keen to get stuck in to this!

1 Like

Awesome! Will this also make it’s way to PIO for Atom, or has the time come for me to download VSCode?

Yes, you should try PlatformIO IDE for VSCode! It worth it! :blush:

Downloading… :grin:

Debugging doesn’t seem to work without being logged into PIO. If I try to log in a message briefly pops up saying “Account: Bad Credentials”. Am I missing something?

Do you have PIO Account? It’s diffe from this community forum. You can create a new via PIO Home- Account

Aaah, that would explain it. Thanks Ivan, I’ll open a PIO account.

Hi, I’ve been trying to configure a custom board debugging using the Unified Debugger, but I couldn’t find any documentation to this regard online. Maybe somebody could help me out with how to set up everything to work…?

So basically I’ve got a custom board which based on the atmega328p AVR chip, I’m using the Arduino framework, but without a bootloader, and the chip runs on 12Mhz. I have a custom board configuration for it in PlatformIO, building and uploading works, only I would need to also have debugging available. For this purpose I have an Atmel ICE debugger, and would want to use the debugWire interface as it’s the only option available on this chip. Also I’m using a MAC with VSCode and PlatformIO plugin with an active license.

I’ve seen that PlatformIO uses GDB underneath, so I think there should be a possibility to actually configure the debugger to run, instead of importing the whole project into Atmel Studio for debugging (which is a real hustle).

Hi, we currently don’t support debugging for AVR. There is no stable and official GDB server for AVR :frowning:
See PIO Unified Debugger for AVR · Issue #95 · platformio/platform-atmelavr · GitHub

Ok I am trying it but I cannot have the autocomplete to work (MacOS) !
any pointer : it’s much more complicated than the Atom IDE

Please wait a while when VSCode re-indexes your project. Also, you can rebuild IntelliSense index manually. See Redirecting...

Sorry but this is not working (I have 2 Mac 10.3.6)
I just keeps loading 41

Do you use PlatformIO IDE for VSCode?

Yes sure !
And also the outline is empty!
I think I’ll stick with Atom for now :frowning_face:

I’ve just checked and it works for me. Please share your platformio.ini and check errors in VSCode > Help > Toggle Developer Tools > Console. Please share them here. Thanks!

Thanks !
here is the platformio.ini

[env:adafruit_feather_m0]
platform = atmelsam
board = adafruit_feather_m0
framework = arduino
lib_deps = SSD1306Ascii ;ID:5169
lib_deps = 868 ; arduino lib  SD (name SD not working !)  
lib_deps = Adafruit DAP library ; ID2116

And here is the console (there seems to be an error with global

INFO standard startup Object
console.ts:136 [Extension Host] Congratulations, your extension "code-gnu-global" is now active!
console.ts:136 [Extension Host] activating extension
console.ts:136 [Extension Host] starting language server
2console.ts:136 [Extension Host] Command: global --encode-path " " -f "/Users/***/Dropbox/Polaxis/IP/Software/EMY_PGMR/src/code.ino" running...
console.ts:136 [Extension Host] Error: Error: Command failed: global --encode-path " " -f "/Users/***/Dropbox/Polaxis/IP/Software/EMY_PGMR/src/code.ino"
global: GTAGS not found.
`global --encode-path " " -f "/Users/***/Dropbox/Polaxis/IP/Software/EMY_PGMR/src/code.ino"` (exited with error code 3)
t.log @ console.ts:136
console.ts:136 [Extension Host] undefined
console.ts:136 [Extension Host] Error: Error: Command failed: global --encode-path " " -f "/Users/***/Dropbox/Polaxis/IP/Software/EMY_PGMR/src/code.ino"
global: GTAGS not found.
`global --encode-path " " -f "/Users/***/Dropbox/Polaxis/IP/Software/EMY_PGMR/src/code.ino"` (exited with error code 3)
t.log @ console.ts:136
console.ts:136 [Extension Host] undefined
console.ts:136 [Extension Host] runCommand platformio Array(1) Object
console.ts:136 [Extension Host] Starting express server on port: 49394
console.ts:136 [Extension Host] using /Users/***/.vscode/extensions/vsciot-vscode.vscode-arduino-0.2.20/vendor/node-usb-native/lib/native/usb-native_darwin_2.0.2_x64.node
console.ts:136 [Extension Host] Found PIO Core 3.6.1-a.4
console.ts:136 [Extension Host] runCommand platformio Array(8) Object
console.ts:136 [Extension Host] runCommand platformio Array(7) Object
console.ts:136 [Extension Host] runCommand /Users/***/.platformio/penv/bin/python2.7 Array(2) Object
console.ts:136 [Extension Host] runCommand /Users/***/.platformio/penv/bin/python2.7 Array(2) Object

Invalid configuration. See Redirecting...

I really like the idea of PIO debugger. I understand that it can massively help with debugging runtime issues with Arduino code. In my case (automation/ceiling at master · ian7/automation · GitHub) I have a test suite that I’m running natively on Windows with use of FakeArduino and Unity. Is there any way I can use PIO debugger to debug my native tests?
cheers