PIO Unified Debugger


#21

Amazing response time :slight_smile:
Works perfect now…

Sorry I poorly explained that.
I meant the “user-button” would be only a substitution for one command in the gdb-console.

For example:
A user would like to save breakpoints:

debug_extra_cmds = define user-command
                        save breakpoints to_some_place.txt
                   end

If the user hit the button the “user-command” is executed (brakepoints are saved).


#22

PlatformIO is great and it keeps getting better. I will buy the Plus version to support this project and I hope that you may consider adding debugging support for JTAG. Specifically I am using Segger JLink on ESP32 and ESP8266.


#23

Thanks a lot! That is a beginning of a new era for PlatformIO. Stay tuned with us on Twitter for the further news.

Can you now debug ESP32 using J-Link? Which debugger/IDE do you use?


#24

Yes, I use VisualGDB to debug ESP chips with J-Link and Olimex ARM-USB-OCD-H. These examples show the Olimex but the Segger works as well. I have both so I can go either way.
https://visualgdb.com/tutorials/esp8266/openocd/
https://visualgdb.com/tutorials/esp32/
This is an example from GoJimmyPi on using the Segger
https://gojimmypi.blogspot.com/2017/02/esp8266-jtag-debugging-in-visual-studiosegger.html


#25

Hi @theflyingzephyr! Have you tried GDBStub debugging over UART with ESP8266?


#26

I wanted to check if this is planned to be released soon as a stable version, or if I need to start using the dev version of PlatformIO IDE in order to use this feature in the near future.


#27

The next PIO IDE 2.0.0.beta.3 is planned for release tomorrow. It will support PIO Unified Debug from a box.


#28

Awesome, I have been subscribing to Plus for several months, but finally on a project that I can use it on. Debugging would be a big bonus.

Thanks!


#29

Could you try it now? Would be thankful for a feedback!

See the first post at the top and “How to try the PIO Unified Debugger?” section for the further instructions.


#30

@ivankravets Congratulations for this nice debugging tool! I’ve just tested it against the LaunchPad TM4C123.

Some questions:

  • How to define a breakpoint? The only way I’ve found was to call the contextual menu.
  • How to define a conditional breakpoint? This is a critical feature when debugging large projects.
  • How to store the breakpoints for later reuse?

Thank you!


#31

Thank you! :blush:

See http://docs.platformio.org/en/latest/projectconf.html#projectconf-debug-extra-cmds

You can define initial breakpoints per specific project environments. Also, you can have more than 1 build environment with different debugging settings.

Please see examples here http://www.fayewilliams.com/2011/07/13/gdb-conditional-breakpoints/

You have 2 options:

  • Define conditional breakpoints in platformio.ini. They will be loaded when a debugging session starts.
  • “Menu: PlatformIO > Debug > Toggle Debugger Console” and add custom breakpoints

#32

Thank you for the answers. My hope is both procedures would be included in PlatformIO GUI.


#33

We have a feature request for that https://github.com/platformio/platformio-atom-ide-debugger/issues/1

Nevertheless, PIO Unified Debugger is universal, it isn’t linked with PIO IDE for Atom and could be integrated with other IDEs, including Eclipse, VSCode, or even VIM/Emacs, etc. We will update our docs later and explain how to do that.

Also, with PIO IDE for Atom, you can debug simultaneously more than 1 target. It could be achieved via different [env:***] in platformio.ini. Here is the question: from the which instance need to remember the last breakpoints?


#34

Also, with PIO IDE for Atom, you can debug simultaneously more than 1 target. It could be achieved via different [env:***] in platformio.ini. Here is the question: from the which instance need to remember the last breakpoints?

Not easy to answer.

Remembering the last breakpoints should be an option.


#35

Thanks, we will implement this feature as soon as possible.


#36

Ardunio SAMD21G18 with Atmel ICE as debugger ?


#37

PlatformIO IDE Debugger for Atom v1.2.0 is out! Please update it, now we remember all breakpoints per project.


#38

#39

Windows

Yes I use platform io to program. Adafruit M0

Atmel ICE


#40

Here is a link to the Debugger: