PlatformIO Community

AttributeError: 'dict' object has no attribute 'get_debug_tool_name'

I wanted to try debugging, using the tutorial but after ‘Start Debugging’ nothing happens and this error is shown in the debug console:

undefinedError: Traceback (most recent call last):
  File "C:\Users\Pascal\.platformio\penv\lib\site-packages\platformio\", line 121, in main
    cli()  # pylint: disable=no-value-for-parameter
  File "C:\Users\Pascal\.platformio\penv\lib\site-packages\click\", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Pascal\.platformio\penv\lib\site-packages\click\", line 1053, in main
    rv = self.invoke(ctx)
  File "C:\Users\Pascal\.platformio\penv\lib\site-packages\platformio\commands\", line 44, in invoke
    return super(PlatformioCLI, self).invoke(ctx)
  File "C:\Users\Pascal\.platformio\penv\lib\site-packages\click\", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Pascal\.platformio\penv\lib\site-packages\click\", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Pascal\.platformio\penv\lib\site-packages\click\", line 754, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\Pascal\.platformio\penv\lib\site-packages\click\", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\Pascal\.platformio\penv\lib\site-packages\platformio\commands\", line 98, in cli
    debug_config =
  File "C:\Users\Pascal\.platformio\penv\lib\site-packages\platformio\debug\config\", line 34, in new
AttributeError: 'dict' object has no attribute 'get_debug_tool_name'


An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
  `pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section

* Report this problem to the developers


I checked and my PIO setup is up-to-date.
running pip install -U platformio or ‘Update All’ command only yields one possible problem:
Updating platformio/contrib-pysite 2.39.201019 @ ~2.39.0 [Incompatible 2.310.220222]

I do have the native toolset, as I can do native unit tests without any problem…
How could I solve this ?
Should I try to reinstall platformio extension ?

Do you use the latest PlatformIO Core? Could you share the output of platformio.ini?

PS C:\Users\Pascal\Documents\PlatformIO\Projects\220303-171038-hello-world> pio  system info
--------------------------  -------------------------------------------------------
PlatformIO Core             5.2.5
Python                      3.9.10-final.0
System Type                 windows_amd64
Platform                    Windows-10
File System Encoding        utf-8
Locale Encoding             cp1252
PlatformIO Core Directory   C:\Users\Pascal\.platformio
PlatformIO Core Executable  C:\Users\Pascal\.platformio\penv\Scripts\platformio.exe
Python Executable           C:\Users\Pascal\.platformio\penv\Scripts\python.exe
Global Libraries            0
Development Platforms       6
Tools & Toolchains          42
--------------------------  -------------------------------------------------------

platformio.ini is standard from the hello world example

; PlatformIO Project Configuration File
;   Build options: build flags, source filter, extra scripting
;   Upload options: custom port, speed and extra flags
;   Library options: dependencies, extra library storages
; Please visit documentation for the other options and examples
platform = native

Can you use the CLI to pio platform update native and retry?

PS C:\Users\Pascal\Documents\PlatformIO\Projects\220303-171038-hello-world> pio platform update native
Platform native
Updating platformio/native                    1.1.4                              [Up-to-date]

Starting debug yields the same error…
Let me try all this on a new fresh PC, to rule out a corrupt setup on my side…
Will post again as soon as I have new info.

This is definitely working on my side


platform = native

just with code above.

No other modifications.

1 Like

ok, on a fresh setup I no longer have this error, so I assume something is corrupt on my workhorse PC, let’s forget about it, I will reinstall the toolchain.

one more thing @maxgerhardt @ivankravets :
on March 26th it is Arduino Week 2022. There was a call for speakers, and I applied with a talk “Developing Arduino Libraries with Platformio” and my talk was accepted.
Talks needed to be pre-recorded, which I have done by now and it was approved by the Arduino Team. As soon as I have a link to the event / recording I will let you know.

Have a nice weekend.

1 Like

@strooom, thanks for your contribution to the PlatformIO ecosystem. Please share with us a link and we would be glad to promote it on our social network.