I’ve used VS Code with Slicer without problems in the past. However, for about a week, something strange and annoying happens when I start VS Code or when I switch workspaces:
two Slicer instances are launched, opening their whole UI, starting with this message
The strange thing is that these Slicers are not the ones I specified as the interpreter, which is "python.defaultInterpreterPath": c:\\d\\S5R\\python-install\\bin\\PythonSlicer.exe, but installed 5.0.2’s which I don’t know where VS Code knows about.
The splash screen popped up before as well on startup or workspace switch, but this is new and I have no idea how to get rid of these 5.0.2 startups. Thanks for any help!
VS Code (and its Python and Jupyter extensions) is very opinionated. It makes lots of assumptions about your Python environment and uses low-level hacks that only work well if all those assumptions are correct (e.g., if you use a standard Python environment).
VS Code assumes that launching a Python interpreter is an invisible, very lightweight operation. It is true for many cases, it would be no problem for PythonSlicer.exe interpreter, etc. but the assumption is not true for Slicer.exe, which is not a lightweight process.
The solution is probably to remove Slicer.exe from the list of interpreters that VS Code knows about. One possible solution (from here) is to temporarily remove Slicer.exe, start VS Code, and select the no-longer-existing Slicer.exe Python interpreter. But maybe you can find the list of interpreters somewhere else and remove Slicer.exe from that list.
Yes. You need to remove Slicer.exe from the list of Python interpreters in Visual Studio Code as described above (or just tolerate this annoyance - it has no side effects, other than you need to close these Slicer instances that VS Code decided to launch).
When I launch vscode, it will start searching slicer kernel.json file.
No error is returned if I set permission for not allowing any program to access.