I am trying to run debug on a basic relay example. Following this example Debugging with PlatformIO: Part 1. Back to the Basics | PlatformIO Labs
I have tried to run it 2 ways. First from top menu. Run>Debug. The controls appear but the step into, step over, step out buttons are grayed out. The entire debug control disappears after a while. The restart and stop icons are active and if I click Restart then I get an error message box
[Content]
Failed to launch GDB: .pioinit:13: Error in sourced command file:
:3333: The system tried to join a drive to a directory on a joined drive. (from interpreter-exec console “source .pioinit”)
I can see the debugger window and I can see the break points and
but the code never stops at the break point. I can hear the program running on the Arduino Uno
If I again select Run>Debug I get a VSCode error message
Failed to launch GDB: .pioinit:13: Error in sourced command file:
Bogus trace status reply from target: timeout (from interpreter-exec console “source .pioinit”)
I have also tried to run it from the quick access control on the left window. No real difference
Here is platformio.ini
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:uno]
platform = atmelavr
board = uno
framework = arduino
debug_tool = avr-stub
debug_port = \\.\COM9
lib_deps =jdolinay/avr-debugger @ ~1.1
Here is launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug",
"executable": "c:/Users/Colin/Documents/PlatformIO/Projects/Relay Example/.pio/build/uno/firmware.elf",
"projectEnvName": "uno",
"toolchainBinDir": "C:/Users/Colin/.platformio/packages/toolchain-atmelavr/bin",
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": {
"type": "PlatformIO",
"task": "Pre-Debug"
}
},
{
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug (skip Pre-Debug)",
"executable": "c:/Users/Colin/Documents/PlatformIO/Projects/Relay Example/.pio/build/uno/firmware.elf",
"projectEnvName": "uno",
"toolchainBinDir": "C:/Users/Colin/.platformio/packages/toolchain-atmelavr/bin",
"internalConsoleOptions": "openOnSessionStart"
},
{
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug (without uploading)",
"executable": "c:/Users/Colin/Documents/PlatformIO/Projects/Relay Example/.pio/build/uno/firmware.elf",
"projectEnvName": "uno",
"toolchainBinDir": "C:/Users/Colin/.platformio/packages/toolchain-atmelavr/bin",
"internalConsoleOptions": "openOnSessionStart",
"loadMode": "manual"
}
]
}