PlatformIO Community

Change gdb_path


Is there a way to permanently change the gdb_path in the idedata.json? If I edit the gdb_path, to /usr/local/bin/gdb, it will be reset after every new start of vscode. If I don’t edit the variable, I always get this debug console warning:

undefinedPython Exception <type ‘exceptions.ImportError’> No module named gdb:
Could not load the Python gdb module from `/Users/jenkins/jenkins/workspace/avr-gcc-staging/label/mac-mini/objdir/share/gdb/python’.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.

I have read and googled a lot, but have not found the right solution, maybe it’s just adding something in the platform.ini?

Help would be much appreciated.

You need to override GBD environment variable using Advanced Scripting — PlatformIO latest documentation

Thank you very much, but I still don’t get it.
I made an file, added it platformio.ini.
I am not familiar with python, so I tried this code:


GDB ="/usr/local/bin/gdb"

Found another solution, by replacing the avr-gdb inside platformio folder with the avr-gdb from Homebrew. Not the best solution, but it works, for now.