Then there is the software debugging part:
Open Thonny and select Raspberry Pi Pico in the lower right corner. When the shell command window prompts as follows, it means that Thonny and Pico are successfully connected: