Torizon IDE extension fails to add a device

Hello.

Recently, when I try to add a device manually, it refuses to connect as if the ip address of the device wasn’t properly captured from the VSCode UI:

[05-30 17:35:31.588] Torizon IDE extension activated
[05-30 17:36:45.962] Trying to connect to 192.168.150.155
[05-30 17:36:48.987] ERROR :: Error trying to connect to  : Host ip is not set or is empty

See that one log message has the proper ip but the second one has an empty string. Because of that, I can’t connect to the device.

It behaves the same with the stable 3.0.4 version and with 3.0.121

VSCode Version: 1.100.2

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello,

Thank you for providing the log details. The error message “Host ip is not set or is empty” suggests the Torizon IDE extension may not be correctly detecting your host machine’s IP address, even though the device IP appears in one log line.

To resolve this issue, here are some steps you can try:

  1. Set overwriteHostIp Manually in VS Code

    • Open the VS Code global settings.
    • Search for torizon.overwriteHostIp.
    • Set it explicitly to your host (development PC) IP address.
    • This setting helps when automatic detection doesn’t work correctly.
    • Reference: Torizon VS Code Extension Troubleshooting
  2. Verify Network Connectivity

    • Run the following command in a terminal to check that your development PC can reach the device:
      ping -W 1 -c 1 192.168.150.155
      
    • If you cannot reach the device, check your network configuration or firewall settings.
    • Reference: Connectivity Troubleshooting
  3. Examine Extension Logs for More Details

    • In VS Code, open the command palette (Ctrl+Shift+P) and select Developer: Toggle Developer Tools.
    • Switch to the Console tab and review any detailed error logs for further clues.
    • Reference: VS Code Extension Log Analysis
  4. Verify Required Ports Accessibility

    • Ensure the following ports are open and accessible between your PC and the device:
      • 22 (SSH to device)
      • 2375 (Docker API)
      • 5002 (Local Docker Registry)
      • 2222 (Container SSH)
    • Reference: Port Requirements

Applying the above steps should resolve the connection and IP detection problem. If the issue persists, gathering and sharing the full console logs from the Developer Tools may help with further diagnosis.

Best regards,
Toradex AI Assistant.

None of this helps unfortunately. The connectivity is there though. When I set up proper data in settings.json manually:

{
  "torizon_psswd": "**redacted**",
  "torizon_login": "torizon",
  "torizon_ip": "192.168.150.155",
  "torizon_ssh_port": "22",
  "host_ip": "10.0.20.2",
  ...
}

I can debug successfully. So it’s something with the extension

Greetings @mkosobucki_kdab,

Interesting, it seems like the extension wasn’t able to automatically this data.

Did you notice any error/warning messages when the extension was starting up after opening VSCode?

Is this reproducible for you?

Finally, did this work in the past and just recently started behaving like this?

Best Regards,
Jeremias

Hi @mkosobucki_kdab did you have a chance to look at the questions from Jeremias above?

Thanks

Hey.

Unfortunately we’re moving offices and I lost access to the device for some time. I’ll re-test once it’s available to me again.