We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

6 posts • Page 1 of 1
Errand
Posts: 7
Joined: Sun Jul 20, 2025 8:15 pm

Raspberry Pi Pico 2W debugger not working on VSCode

Tue Sep 23, 2025 7:20 pm

I'm trying to debug my RaspberryPi Pico 2W in VSCode.
I can download and execute the program without problems, but if try debugging it I get error and the IDE breaks and ask me to edit the launch.json file.
I didn't find any solution right now.
I'm running the debugger on macOS Sequoia 15.6.1 (24G90), Apple Silicon M4.

Thank you in advance for any suggestion.

will-v-pi
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 150
Joined: Tue Sep 12, 2023 9:51 am

Re: Raspberry Pi Pico 2W debugger not working on VSCode

Wed Sep 24, 2025 12:41 pm

Have you connected your Debug Probe correctly (see 4.3 in https://datasheets.raspberrypi.com/pico ... h-pico.pdf)?

Also, what exact error messages are you getting (maybe look at the Debug Console tab, and the Terminal -> gdb-server tab, for more details)?

And are you using the Pico VS Code extension, or a different setup?

Errand
Posts: 7
Joined: Sun Jul 20, 2025 8:15 pm

Re: Raspberry Pi Pico 2W debugger not working on VSCode

Sun Sep 28, 2025 6:26 pm

Thank for your reply!
The Pico Debugger is correctly connected.
I'm using the Pico VS Code extension.

If I select "Pico Debug (Cortex-Debug), i get the following error (dgb-server console):
[2025年09月28日T18:23:14.501Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
/Users/flaviorenga/.pico-sdk/openocd/0.12.0+dev/openocd.exe -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s /Users/flaviorenga/.pico-sdk/openocd/0.12.0+dev/scripts -f /Users/flaviorenga/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl -f interface/cmsis-dap.cfg -f target/rp2350.cfg -c "adapter speed 5000"
dyld[74461]: Library not loaded: /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib
Referenced from: <1C1CBE82-1587-3EC3-8B7D-5786D04BAA56> /Users/flaviorenga/.pico-sdk/openocd/0.12.0+dev/libjim0.83.dylib
Reason: tried: '/opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib' (no such file), '/opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib' (no such file)
[2025年09月28日T18:23:14.592Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...

will-v-pi
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 150
Joined: Tue Sep 12, 2023 9:51 am

Re: Raspberry Pi Pico 2W debugger not working on VSCode

Mon Sep 29, 2025 9:35 am

Looks like our releases still don’t contain all the shared libraries used - as a workaround you could try installing OpenSSL with homebrew which should fix that issue

flyindon
Posts: 1
Joined: Sun Oct 05, 2025 9:32 pm

Re: Raspberry Pi Pico 2W debugger not working on VSCode

Sun Oct 05, 2025 10:18 pm

I would be interested to know if the recommended solution worked. I have been fighting the same problem for a long time now using Pi Pico 1. For a sanity check, I used platformio and wrote a small program using the Arduino framework, and the debugger works fine with the code. (the debugger hardware and openocd are the same). Going back to VS Code and the Pico IDE, I modified the launch.json configurations to use openocd in the .platformio directory and the debugger works. If you have platform installed, you can modify the launch.json to:
"server path": /Users/<PUT YOUR USER DIRECTORY HERE>/.platformio/packages/tool-openocd-rp2040-earlephilhower/bin/openocd".
Also, if it isn't there, you may need to add :
"overrideLaunchCommands" :[ "monitor reset init", "load \"${workspaceFolder}/build/<INSERT YOUR PROJECT NAME.ELF>\"" ]
If you haven't found another solution by now and want to try this, I am happy to provide the launch.json configurations so you don't need to type all this stuff.
I know this is messy and crude, but it is the only thing I found to work for me. I hope there will be a clean solution coming soon. THIS WORKED FOR THE RP2040. I didn't try it for the RP2350.

Errand
Posts: 7
Joined: Sun Jul 20, 2025 8:15 pm

Re: Raspberry Pi Pico 2W debugger not working on VSCode

Sat Nov 01, 2025 4:29 pm

SOLVED!

Just uninstalled and reinstalled all the things from scratch

From VSCode:
1. uninstall all the extensions
2. update VSCode
2. close VSCode
3. update OpenSSL from terminal:
- brew update
- brew install openssl
- openssl version
4. open VSCode
5. install the required/desired extensions:
- Raspberry Pi Pico
- All the suggested extensions
6. close VSCode
7. open VSCode
8. create new blink project from examples
9. run the project => ok!
10. debug the project => ok!

Use Pico Debug (Cortex-Debug) for debugging.

It seems that all the required stuff (eg. OpenSSL) should be available and updated just BEFORE installing the Raspberry Pi and other extensions.

Let me know if that works for you!

6 posts • Page 1 of 1

Return to "SDK"

AltStyle によって変換されたページ (->オリジナル) /