vscode-python: vscode cannot load Python extension on ssh remote server
Environment data
- VS Code version: 1.40.2
- Extension version (available under the Extensions sidebar): 2019.11.50794
- OS and version: 10.13.5
- Python version (& distribution if applicable, e.g. Anaconda): Python3.7, Anaconda3.6
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
- Relevant/affected Python packages and their versions: XXX
- Jedi or Language Server? (i.e. what is
"python.jediEnabled"
set to; more info #3977): XXX
Expected behaviour
The vscode should automatically load the python extension after open a .py file, like following (from my local Mac).
Actual behaviour
I found this problem on 1.38, 1.39, 1.40 of vscode.
On ssh remote server, I open a python file (.py). On the bottom, vscode shows that it is activating extension.
However, after a few seconds, the activating extension
sign disappears, and I cannot edit my code in editor and I cannot type anything in the terminal in vscode. On my Mac, I found that it took several minutes and a lot of computation (from the accelerating cooling fan sound) to activate and load python extension, but eventually it works. So I suspect that it stops working, because it requires too much computation resources to load the Python extension. This doesn’t happen before I updating my vscode.
I wonder is that because some issues of new version of python-extension? How can I downgrade my vscode python extension?
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
- Open vscode and connect to remote server without open any files. At this point, I can still type command in the terminal in vscode.
- When I open a .py file, vscode tries to activate python-extension. Then, everything gets stuck. I cannot type command in terminal and I cannot edit my .py code.
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
[[2019-12-03 11:52:40.504] [exthost] [info] extension host started
[2019-12-03 11:52:40.665] [exthost] [info] ExtensionService#_doActivateExtension GrapeCity.gc-excelviewer {"startup":false,"extensionId":{"value":"GrapeCity.gc-excelviewer","_lower":"grapecity.gc-excelviewer"},"activationEvent":"onLanguage:plaintext"}
[2019-12-03 11:52:40.665] [exthost] [info] ExtensionService#loadCommonJSModule file:///home/user/.vscode-server/extensions/grapecity.gc-excelviewer-2.1.32/dist/extension
[2019-12-03 11:52:40.749] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch {"startup":true,"extensionId":{"value":"vscode.debug-auto-launch","_lower":"vscode.debug-auto-launch"},"activationEvent":"*"}
[2019-12-03 11:52:40.749] [exthost] [info] ExtensionService#loadCommonJSModule file:///home/user/.vscode-server/bin/f359dd69833dd8800b54d458f6d37ab7c78df520/extensions/debug-auto-launch/dist/extension
[2019-12-03 11:52:40.752] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"extensionId":{"value":"vscode.emmet","_lower":"vscode.emmet"},"activationEvent":"*"}
[2019-12-03 11:52:40.752] [exthost] [info] ExtensionService#loadCommonJSModule file:///home/user/.vscode-server/bin/f359dd69833dd8800b54d458f6d37ab7c78df520/extensions/emmet/dist/extension
[2019-12-03 11:52:40.774] [exthost] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"extensionId":{"value":"vscode.git","_lower":"vscode.git"},"activationEvent":"*"}
[2019-12-03 11:52:40.774] [exthost] [info] ExtensionService#loadCommonJSModule file:///home/user/.vscode-server/bin/f359dd69833dd8800b54d458f6d37ab7c78df520/extensions/git/dist/main
[2019-12-03 11:52:40.817] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"extensionId":{"value":"vscode.merge-conflict","_lower":"vscode.merge-conflict"},"activationEvent":"*"}
[2019-12-03 11:52:40.817] [exthost] [info] ExtensionService#loadCommonJSModule file:///home/user/.vscode-server/bin/f359dd69833dd8800b54d458f6d37ab7c78df520/extensions/merge-conflict/dist/extension
[2019-12-03 11:52:40.821] [exthost] [info] ExtensionService#_doActivateExtension kisstkondoros.vscode-gutter-preview {"startup":true,"extensionId":{"value":"kisstkondoros.vscode-gutter-preview","_lower":"kisstkondoros.vscode-gutter-preview"},"activationEvent":"*"}
[2019-12-03 11:52:40.821] [exthost] [info] ExtensionService#loadCommonJSModule file:///home/user/.vscode-server/extensions/kisstkondoros.vscode-gutter-preview-0.23.0/dist/extension
[2019-12-03 11:52:40.848] [exthost] [info] ExtensionService#_doActivateExtension natqe.reload {"startup":true,"extensionId":{"value":"natqe.reload","_lower":"natqe.reload"},"activationEvent":"*"}
[2019-12-03 11:52:40.848] [exthost] [info] ExtensionService#loadCommonJSModule file:///home/user/.vscode-server/extensions/natqe.reload-0.0.6/out/extension
[2019-12-03 11:52:40.850] [exthost] [info] eager extensions activated
[2019-12-03 11:53:14.451] [exthost] [info] ExtensionService#_doActivateExtension vscode.python {"startup":false,"extensionId":{"value":"vscode.python","_lower":"vscode.python"},"activationEvent":"onLanguage:python"}
[2019-12-03 11:53:14.451] [exthost] [info] ExtensionService#loadCommonJSModule file:///home/user/.vscode-server/bin/f359dd69833dd8800b54d458f6d37ab7c78df520/extensions/python/dist/pythonMain
[2019-12-03 11:53:14.453] [exthost] [info] ExtensionService#_doActivateExtension ms-python.python {"startup":false,"extensionId":{"value":"ms-python.python","_lower":"ms-python.python"},"activationEvent":"onLanguage:python"}
[2019-12-03 11:53:14.453] [exthost] [info] ExtensionService#loadCommonJSModule file:///home/user/.vscode-server/extensions/ms-python.python-2019.11.50794/out/client/extension
[2019-12-03 11:53:14.770] [exthost] [info] ExtensionService#_doActivateExtension VisualStudioExptTeam.vscodeintellicode {"startup":false,"extensionId":{"value":"VisualStudioExptTeam.vscodeintellicode","_lower":"visualstudioexptteam.vscodeintellicode"},"activationEvent":"onLanguage:python"}
[2019-12-03 11:53:14.770] [exthost] [info] ExtensionService#loadCommonJSModule file:///home/user/.vscode-server/extensions/visualstudioexptteam.vscodeintellicode-1.2.0/dist/intellicode
Adding notes: I looked into relevant issues opened but not addressed yet:
- Post1: The python language server take too much resources.
- Post2: Too much resource is used after upgrading the python extension.
- Post3:
Python extension loading
pending forever. - Post4: Python extension failed to load.
All solutions suggested are either using development version, or uninstall/disable other extensions, or creating a separate issue. However, I tried all of them and none of them works (consistent with what has been said in those posts). I also tried to downgrade the python extension, and use better wifi-network, looks like it can start the process to load python extension, but it cannot finish (python extension loading
last forever).
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging
)
XXX
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 16 (7 by maintainers)
Hi Guys, I’m facing the same issues. Please see my logs.
Comments: I’m facing the same issues reported. When I try to work from my local network it works fine. When I try to connect from a wan network I get the results below. I’m able to connect on the remote server, but the Python extension never gets ready.
I deleted de .vscode_server folder from the server and reinstalled the server again, using just the MS python extension. What I noticed from Activity Monitor is that while the python extension was loading the ssh transferred almost 2 gb in and 2gb out. The extension seems to slowly start to activate the functions but it never gets ready. The remote server has a 120mbs connection and I’m a similar connection on the host.
Environment data
"python.jediEnabled"
set to; more info #3977): Language ServerExpected behaviour
Python commands running normally
Actual behaviour
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)