The Raspberry Pi Pico Board can now be debugged using an External Hardware debugger, directly in Visual Studio, with vMicro!
External Debug Interface: SWD
This is available from vMicro versions 2021.0606.6 onwards, in conjunction with the "Arduino Mbed OS RP2040 Boards" platform.
To see a list of all debuggers currently supported within vMicro please click here.
External Debugger Connections
To connect your SWD debugger to the Raspberry Pi Pico board you will need to connect the below pins:
Then you will also need to connect your Debugger to the PC on one USB port, and the Raspberry Pi Pico on another USB Port
Ensure you have Visual Studio and the vMicro Extension Installed
Open your Sketch and select the Debug > Hardware, and the relevant Debugger you have available
You may need to install an additional USB Driver on Interface 0 of your debugger to allow it to function with this software - check in the debugger list here
Remember - If you have installed a new driver, you may have to do it again if you connect the debugger to a different USB port next time.....
- Ensure you have the Debug Configuration selected from the Configuration Manager Window
- If you know where you want the first breakpoint in your code, add it now
- To start the debugging process, you can either:
- "Debug > Attach to Process" button if your code has already been uploaded to the Raspberry Pi Pico board
- "Debug > Start Debugging" if your code has not been uploaded
Congratulations - you should have the debugger running, and further windows can be opened from the "Debug > Windows" menu once you have started debugging