How to specify non-standard Python interpreter?

最后都变了- 提交于 2021-02-05 11:44:24

问题


My application has built-in Python interpreter and I need to debug Python code there. However Visual Studio Code allows to choose only from interpreters found in paths and named python/python2/python3.

I tried to set python.pythonPath in settings.json to point to my application, but Visual Studio Code doesn't recognize it as valid Python interpreter.

Sure, I need to make sure that my application behave like Python interpreter and pass all command-line parameters to Python ptvsd_launcher.py.


回答1:


The "python.pythonPath" setting is how you can specify a Python interpreter that is not automatically detected. If the binary does not function as a normal python binary then unfortunately there's no way for the extension to use it.



来源:https://stackoverflow.com/questions/57277652/how-to-specify-non-standard-python-interpreter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!