Debug Port error using VScode Debugger

I am new to vscode and I have set up VScode, C++ and Platformio to use as development IDE for Ardunio and ESP32 systems. I completed the setup and entered a new project for a small Ardunio application. The application all works and I can compile and download it. I can start the debugger system and set Breakpoints but when a try to run the debugger I get the error “Error: Please specify debug_port for environment The terminal process “C:\Users\pcoll.platformio\penv\Scripts\platformio.exe ‘debug’” terminated with exit code: 1.” Can you help - many thanks

What external debugger have you connected to your board? ESP-PROG or something else? If yes, you need to configure it in the platformio.ini (docs). If no: You need a JTAG debugger for this, see e.g. this article.

Thanks for this info, I have ordered the external debuggers for use when I program the ESP-32. However, Currently, I am not using the ESP-32 I am still using the Arduino UNO and the debugger still wants a debug port and I do not have one. Neither do I know where to load it. I have looked in settings without success. I am just trying to debug a small Arduino IDE code with a UNO board in the VScode environment. Hope this helps - Thanks

Debugging an Arduino Uno is possible via either simulating it (simavr) or running avr-stub on it and communicating with it via the normal serial port (this will also be the needed debug_port). We havea plenty of documentation for that in the post and documentation linked at How to debug on Arduino mega 2560 - #2 by maxgerhardt, simavr — PlatformIO latest documentation, Arduino Uno — PlatformIO latest documentation, etc.