VS Code Torizon extension not connecting to WSL

Hi,
I’m working with a Verdin DK Dev board v1.1 F and Verdin imx8mp Q 4GB WBIT SOM.
I installed VS Code Torizon extension, went through all the steps and the setup was working fine. I was able to deploy containers to the DK no prob. Couple of days later, VS Code is hanging saying it can’t connect to WSL (see screenshot attached). I’ve uninstalled VS Code and its extension a couple of time, but the problem persists. I’d appreciate your help troubleshooting this issue.
Thanks!

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

I’m sorry to hear about the trouble you’re experiencing with the Visual Studio Code Torizon extension and WSL. Let’s try a few steps to resolve this issue:

  1. Verify WSL Connection: Make sure you’re launching Visual Studio Code from a WSL terminal. Open a WSL terminal and use the command code . to start VS Code. Check the bottom left corner of the VS Code window to confirm it shows the WSL distribution name.

  2. Network Connectivity: Ensure that both your development machine and the Verdin development board are connected to the same network. This is essential for the Torizon extension to communicate effectively with the board.

  3. Port Forwarding: Verify that the necessary ports are open and accessible between your machine and the development board. The Torizon extension might require specific ports to be open, depending on your project setup.

  4. Check Internal Logs: Use the VS Code command palette to select “Developer: Toggle Developer Tools”. In the new window, go to the “Console” tab to view logs. Look for any error messages that might give more insight into the connection issue.

  5. Reinstall and Update: Although you’ve reinstalled VS Code and the extension, double-check that both are updated to the latest versions. Updates can sometimes resolve underlying issues.

By following these steps, you should be able to identify and resolve the connection issue with the Torizon extension. If the problem continues, examining the specific error messages in the logs can help pinpoint the root cause.

I hope this helps! If you have any more questions, feel free to ask.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Problems setting up VS Code IDE Extension V2.

Hey @asr_syk,

A few questions:

Are there any error logs associated with this event?
Are you able to open the windows command prompt and manually run your wsl environment?
Are you switching networks or logging into a work VPN?

-Eric

Hi Eric,
I was able to fix the issue. Since VS Code was getting stuck trying to connect, it wouldn’t let me do anything on it. I couldn’t uninstall the Torizon extension, to try and install it again. Anyways, after a few tries, I manually deleted the extensions from it’s directory location. Installed the Torizon extension again on VS Code (Windows) and it asked me to install it in WSL. I did so and now it seems to be working fine.
I do switch networks between home and office, but I’m able to connect to the target in both places.
Thanks.