You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Setting PythonSlicer as the interpreter is expected to enabled auto-complete for python module like slicer.util
PythonSlicer interpreter
VS Code Python extension
Despite of having the python interpreter properly setting environment variables like PYTHONPATH, user has been expected to set additional settings 12 like python.autoComplete.extraPaths3 and python.analysis.extraPaths4
This requires tedious configuration and ideally relevant setting files should be directly configured.
Describe the solution you'd like
Configure a workspace file referencing the source and build trees as well as the PythonSlicer interpreter.
Manually setting "python.analysis.logLevel": "Trace" and inspecting the Output Panel (by selecting Python Language Server) allows to confirm that the environment is discovered:
Is your feature request related to a problem? Please describe.
Setting
PythonSlicer
as the interpreter is expected to enabled auto-complete for python module likeslicer.util
PythonSlicer
interpreterDespite of having the python interpreter properly setting environment variables like
PYTHONPATH
, user has been expected to set additional settings 12 likepython.autoComplete.extraPaths
3 andpython.analysis.extraPaths
4This requires tedious configuration and ideally relevant setting files should be directly configured.
Describe the solution you'd like
Configure a workspace file referencing the source and build trees as well as the
PythonSlicer
interpreter.Manually setting
"python.analysis.logLevel": "Trace"
and inspecting theOutput Panel
(by selectingPython Language Server
) allows to confirm that the environment is discovered:Pylance language server Trace
Describe alternatives you've considered
Require users to explicitly configure their environment.
Additional context
Footnotes
https://discourse.slicer.org/t/developing-slicer-modules-in-visual-studio-visual-studio-code/9496/8 ↩
https://discourse.slicer.org/t/developing-slicer-modules-in-visual-studio-visual-studio-code/9496/23 ↩
https://code.visualstudio.com/docs/python/settings-reference#_autocomplete-settings ↩
https://code.visualstudio.com/docs/python/settings-reference#_python-language-server-settings ↩
The text was updated successfully, but these errors were encountered: