Comments (15)
since it looks like
pylance
is crashing even before starting server, you probably can't use https://github.com/microsoft/pylance-release/wiki/Collecting-data-for-an-investigation.#collecting-trace-logs-using-commands but if you somehow could manage to make server to start you could use the command to get log we need.
I have used slightly downgraded versions of pylance recently that will successfully load/connect for a while before restarting the remote extension host. I just connected with v2024.2.3 and was able to get output in the Python Language Server. I will wait to see if the restart issue occurs and report back with the output.
from pylance-release.
Can you provide us some logs as described in the troubleshooting guide?
from pylance-release.
Can you provide us some logs as described in the troubleshooting guide?
I tried to enable the trace log level (at the User, Remote Server, and Workspace levels) but the Python Language Server output contains nothing at all. Is there another log I can provide that would contain the needed information?
from pylance-release.
When you say "contains nothing at all", do you mean there's no output at all in the Python Language Server output? Not sure how could that happen. Can you share a screenshot of that? and your settings.json
?
from pylance-release.
When you say "contains nothing at all", do you mean there's no output at all in the Python Language Server output? Not sure how could that happen. Can you share a screenshot of that? and your
settings.json
?
Here is a screenshot of the Python Language Server output:
And here is a screenshot of the Python output just to show that this is not a more general output problem:
Here is the text of the settings.json file:
{
"editor.minimap.enabled": false,
"jupyter.askForKernelRestart": false,
"python.autoComplete.extraPaths": [],
"python.analysis.extraPaths": [],
"remote.SSH.remotePlatform": {
"ap2002.chtc.wisc.edu": "linux"
},
"python.defaultInterpreterPath": "C:\\ProgramData\\anaconda3\\envs\\<USER'S NAME>\\python.exe",
"git.ignoreLegacyWarning": true,
"remote.SSH.useExecServer": false,
"python.analysis.logLevel": "Trace",
"python.analysis.packageIndexDepths": [
{
"name": "sklearn",
"depth": 2
},
{
"name": "matplotlib",
"depth": 2
},
{
"name": "scipy",
"depth": 2
},
{
"name": "django",
"depth": 2
},
{
"name": "flask",
"depth": 2
},
{
"name": "fastapi",
"depth": 2
}
]
}
from pylance-release.
if you are using remote and multi root workspace, make sure you are putting settings in right place and share the right setting files.
you should have settings section similar to this for your remote/workspace/folder
the precedence of setting will be
folder > workspace > remote
and some setting can only applied to certain scope. for example, you can't put logLevel
to folder
but in workspace
and up and etc.
from pylance-release.
since it looks like pylance
is crashing even before starting server, you probably can't use https://github.com/microsoft/pylance-release/wiki/Collecting-data-for-an-investigation.#collecting-trace-logs-using-commands but if you somehow could manage to make server to start you could use the command to get log we need.
from pylance-release.
if you are using remote and multi root workspace, make sure you are putting settings in right place and share the right setting files.
you should have settings section similar to this for your remote/workspace/folder
the precedence of setting will be folder > workspace > remote
and some setting can only applied to certain scope. for example, you can't put
logLevel
tofolder
but inworkspace
and up and etc.
I have set the loglevel setting to Trace at the User, Remote, and Workspace levels just to make sure I had the right one. The Folder option does not have this setting available as far as I can tell.
from pylance-release.
After downgrading to v2024.2.1, I was able to connect to my remote ssh with pylance functioning properly, but after waiting some time in the editor pylance seemed to stutter and disconnect. It attempted to reconnect a couple times before successfully doing so. I am attaching the python language server output starting at the moment it initially disconnected.
Please note: this is NOT the exact issue I have with newer versions of pylance. If I use the most recent version, it fails to connect at all upon logging in through the ssh process.
pylance python language server output v2024.2.1.txt
from pylance-release.
I can not see any issue on pylance log, it looks like pylance extension suddenly restarted. can you look other logs in the output window and see whether it contains error message such as remote got disconnected? if you see one, can you share that log with us? it might be an issue with vscode remote and we just happen to restarted since vscode-server
got re-initialized.
from pylance-release.
I can not see any issue on pylance log, it looks like pylance extension suddenly restarted. can you look other logs in the output window and see whether it contains error message such as remote got disconnected? if you see one, can you share that log with us? it might be an issue with vscode remote and we just happen to restarted since
vscode-server
got re-initialized.
I monitored a couple of the logs while trying to recreate the issue, but I could not seem to identify any that would provide useful information as to what is happening. Here is the list of logs available:
For example, Extension Host (Remote) seemed promising, but it appears to clear/restart whenever this occurs, so I cannot see what happened prior to the issue occurring.
Are there any you would like to see specifically?
from pylance-release.
how about remote - SSH
log? does it contain anything interesting there?
from pylance-release.
how about
remote - SSH
log? does it contain anything interesting there?
Nothing is very interesting in that log either. For example, here is all the additional output produced by this issue occurring once:
[16:17:13.840] [Forwarding server port 52873] Got connection 9
The integer at the end increases every time this happens (starts at 1).
from pylance-release.
could it be something related to something like this? https://stackoverflow.com/questions/64172004/vscode-ssh-extension-keeps-disconnecting-after-moving-to-a-new-location
from pylance-release.
could it be something related to something like this? https://stackoverflow.com/questions/64172004/vscode-ssh-extension-keeps-disconnecting-after-moving-to-a-new-location
I tried the suggested solution of removing the .vscode-server
and .vscode-remote
(this second one did not exist in my case, so I only removed the first one), but it did not fix the issue. The Remote Extension host still terminates upon logging in via ssh when using the most recent version of pylance.
from pylance-release.
Related Issues (20)
- Consecutive comment lines are not foldable in Python but are in (at least some) other languages HOT 1
- Pylance makes type hints in Python unusable for me HOT 14
- `"python.analysis.autoImportCompletions": false` not working. HOT 1
- Syntax highlighting issue for a valid conditional logic when type hints provided HOT 3
- PyLance crashes when setting node option '--no-deprecation' HOT 24
- My VSCode keep freezing because of Pylance HOT 1
- pylance bug HOT 1
- F2 renaming not working across all python files HOT 2
- Better string completions HOT 1
- import side by side in standalone file didn't work HOT 1
- Problema com desempenho HOT 1
- wtegt HOT 1
- wtegt HOT 1
- wtegt HOT 1
- "Not a known attribute" error HOT 12
- pylance crashing all the time HOT 1
- Pylance Performance Issue HOT 1
- pylance crash: Allocation failed - JavaScript heap out of memory HOT 16
- report HOT 2
- issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pylance-release.