How to debug a Rapberry Pi Pico Arduino project?

I am trying to follow the Platformio debugging instruction for the Raspberry Pi Pico but can’t figure out what firmware I need to install on the second Pico that acts as a debugger. Any suggestions?

Documentation:
Raspberry Pi Pico — PlatformIO latest documentation which leads to this Raspberry Pi SWD — PlatformIO latest documentation

My platformio.ini

[env:pico]
platform = raspberrypi
board = pico
framework = arduino
debug_tool = raspberrypi-swd

EDIT: After further research, am I supposed to use ‘debug_tool = cmsis-dap’? Also noticed that RPI came with a debug probe version of the Pico, looks nice, I will order and give it a try.

Ok, figured this out.

For using a bare Pico as a debugger. Flush picoprobe.uf2 from here (or a later release if available) Releases · raspberrypi/picoprobe · GitHub , and have debug_tool = cmsis-da in platformio. GP3 is SWD DIO and GP2 is CLK.

I guess that the other release file debgprobe.uf2 is for the RPI debugger product which has additional hardware and possibly using other GPIO pins.

EDIT: The extra serial port that will appear in your computer is connected to UART1 of the Pico, GP4 (TX), GP5 (RX). It can be connected to a serial port of the target device for debug log.