Jump to content

Can't connect to vscode


---
 Share

Recommended Posts

Hello everyone,

I have recently started to get into scripting in ZEISS INSPECT 2025 but using the internal editor is really holding me back, so i tried to connect vscode using this guide: 

Using Visual Studio Code as an add-on editor — Add-On Documentation

However, when clicking on "Host: Disconnected" the only thing that happens is it tries to add a nonexisting folder to the workspace and doesn't connect.

image.png.fc21610b9f5cad4fb6b94ba216d99927.png

When I change the Editor Port in INSPECT to something else, vscode gives me an error saying "Cannot connect to application" so i know that the settings are correct.

The settings in INSPECT also look a little different from the Guide, as  they are under Apps->API configuration and there appears to be an API key which is not mentioned anywhere else.

Link to comment
Share on other sites

Yes, without it there wouldn't be a "Host: disconnected" Button.

I have also tried multiple versions of this addon.

Link to comment
Share on other sites

I have now also tested this with INSPECT 2025 - and also get no connection from VSC to INSPECT! With the INSPECT 2023 version, on the other hand, this works perfectly. I set the port to the same value 40000 in both versions.

Link to comment
Share on other sites

  • 2 months later...
---

Please sign in to view this quote.

hello

any news about the update? i was also looking for api in the vs settings but there was not any option for the api

Link to comment
Share on other sites

---

Hi,

an update of the ZEISS INSPECT VSCode Extension will be released shortly.

Best regards,

Matthias

Link to comment
Share on other sites

---

Hello,

an update of the VSCode extension "ZEISS INSPECT App Development" has been released on ZEISS INSPECT App Development - Visual Studio Marketplace.

Please see Using Visual Studio Code as App editor — App Development Documentation for setup and usage.

Users of ZEISS INSPECT 2023 or earlier still have to keep using the VSCode extension version 2024.x.y.

Best regards,

Matthias

Link to comment
Share on other sites

---

Thanks Matthias,
I've followed the instructions, installed python 3.9, zeiss-inspect-api via pip, updated VScode extension to 2025.3.110, configured settings, choose 3.9 as python interpreter, & was able to connect,
but its not loading any add-ons / workspaces into the explorer as it did in 2023:

So although i'm 'connected' I see:
image.png.cb281dec2589889b1ced520f5b732187.png

 

but I am connected & see all the elements in the zeiss inspect 2025 (blank)project:
image.thumb.png.49fc5bd421cc15eac8aa15c1cd222be6.png
 

disconnecting/reconnecting throws an error in bottom right comer:
"Cannot Connect to Application: Error: a provider for the scheme 'scriptfs' is already registered'

image.png.dc289f4a46f042dd726106c6c36b2c91.png
Not sure if its related, or just because I disconnected/reconnected.
(it doesn't appear on initial connection)

I tried uninstalling the zeiss inspect pluggin for vs-code, re-installing, restarting computer...etc. no luck.
then I tried un-installing vs-code, deleting %APPDATA%\Code & %USERPROFILE%\.vscode
then re-installing visual studio code / zeiss plugin, but still no luck.
Any idea on what could be causing this? 

Link to comment
Share on other sites

---

Hi Devon,

which VSCode version are you using?

Could you please re-check that the API port and the editor port numbers configured in ZEISS INSPECT and in the VSCode extension are matching? 

Best regards,

Matthias

 

Link to comment
Share on other sites

---

Hey Matthais, thanks for the quick response
Visual studio code is v 1.100.2
Zeiss Inspect extension 2025.3.110
zeiss-inspect-api v2025.3.0.420
zeiss inspect v2025.1.0.1985
Port on extension & Zeiss Inspect = default 40000
tried changing it (30000) - no luck.
let me know if a support ticket would be more appropriate.  Thanks as always for your help!

image.thumb.png.50eae62f45a62f3efa3cbc22dab450ae.pngimage.thumb.png.59c21c8c25572de4f30c136d60ee806e.pngimage.png.4099d179bcab2e869d00f0b1da23136a.pngimage.thumb.png.45244de9128ed6c8cc3813456f3a1486.pngimage.png.78b2f9c8d8b94d7ef0d86ad6e713a8ce.png

 

Link to comment
Share on other sites

---

Hi Devon,

thank you for the detailed information. I think you need at least ZEISS INSPECT 2025 Service Pack 1, i.e. 2025.2.x

Could you please try to update?

Everything else looks fine.

Best regards,

Matthias

Link to comment
Share on other sites

---

Ah, damn! I thought 2025.1 meant Service pack 1, my bad. installed 2025.2, works like a charm! thank you!!!

Link to comment
Share on other sites

---

Hey Matthias,
few questions for you:

I was able to get connected & see apps both in locked/edit mode, but when I try to run a script I get this error:
image.thumb.png.a7bd795c15f623a6f5e41568bb106a87.png
1. should I ignore / do not show again? (..still seems to execute / debug just fine).
1.b - do we need to use python 3.9? or can I use a 3.10 - 3.13 ?


2.
prior to script execution I get an error/warning:
image.png.412762bf19aaf6b3a49131bbb1f7fc80.png
image.thumb.png.466eccd04c5c848355d9cbe68364973d.png
but it seems to import ok during runtime.
2. anyway to fix this? disable pylance?

most important:
3. when I try to run kiosk mode through the 'start' in kioskmode(customizations) I get this error:

image.thumb.png.51e0e3eca5eb7eaf6615fc684a1234a8.png
is that because its trying to import workflow from the system scripts (which aren't in edit mode?) anyway to fix this?

4. to create a new gom script in vscode, do I just choose New File? i'm looking for the 'create gom script' equivalent that we had in the old version/2023.
image.thumb.png.c45c7ed071162c396de7a4e3b2aca208.png
 

Side question
5.(highest importance = )
where do I get this!?
image.thumb.png.b9d508b0a2e322d6f04b35455a8bc721.png
I've been going through v2025 Kisok Mode's 5,000 lines of python code trying to trace references and dependencies with documentation from 2018 & the built in, 1 window .add on editor.

ZeissGPT would be a godsend. 😃

sorry for the headache, and thanks for all your help, hopefully this post helps someone else who's having similar issues.

Link to comment
Share on other sites

---

Hi Devon,

Just a quick answer to parts of your questions:

4. Yes, you can use "New File..." to add a Python script to your App. A special VSCode command is no longer needed.

The new file might not be visible in the ZEISS INSPECT built-in App Explorer immediately. In this case, you can run the command 

gom.script.sys.update_addon_database()

from an App.

5. ZeissGPT is a ZEISS internal extension, which is not related to the ZEISS INSPECT extension. Maybe you can use GitHub Copilot?

I will come back to the remaining question soon.

Best regards,

Matthias

Link to comment
Share on other sites

---

Hello all,

I also encountered a problem when trying to use VSCode with 2025 software. I got module not found errors for  already installed python packages like tkinter etc. which are installed in my specific apps created in 2023 version.

I am not sure whether the problem arises due to migrating add-on packages from 2023 software or VS-Code related.

Many Thanks,

Canset

Link to comment
Share on other sites

Hi Canset,

we are checking this. In the meantime - as a potential workaround - can you try to install the same packages you are using in your Apps (which are already installed using the ZEISS INSPECT App Explorer) in the external Python 3.9 environment, too?

Best regards,

Matthias

Link to comment
Share on other sites

 Share

×
×
  • Create New...