This executive summary might be of interest, particularly if you are new to debugging.
For applications that use pico-sdk (pico-examples, etc. ... this is true of nearly all code), please follow the instructions in building.md.
You have a choice between this and "debugging Pico applications with pico-debug without using the GDB protocol" further below.
First make certain that you have followed the steps above in "building Pico applications".
For OpenOCD users, please follow the instructions in openocd.md.
For pyOCD users, please follow the instructions in pyocd.md.
Then proceed to "debuggers that use GDB" immediately below.
First make certain that you have your GDB implementation of choice running (OpenOCD, pyOCD, etc.).
For Visual Studio Code users, then also read vscode.md.
For SEGGER Embedded Studio users, take a look at the pico-ses example in pico-demos.
You have a choice between this and "debugging Pico applications with pico-debug using the GDB protocol" further above.
First make certain that you have followed the steps above in "building Pico applications".
If you are a Rowley Crossworks for ARM user, v4.8.3 and higher is already capable of debugging RP2040 targets (including ones using pico-debug).
If you use Keil MDK or Keil MDK-Lite, take a look at Pico_Template.