Giter VIP home page Giter VIP logo

Comments (15)

SKra00 avatar SKra00 commented on June 8, 2024 1

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.

heejaechang avatar heejaechang commented on June 8, 2024

Can you provide us some logs as described in the troubleshooting guide?

from pylance-release.

SKra00 avatar SKra00 commented on June 8, 2024

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.

StellaHuang95 avatar StellaHuang95 commented on June 8, 2024

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.

SKra00 avatar SKra00 commented on June 8, 2024

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:
image

And here is a screenshot of the Python output just to show that this is not a more general output problem:
image

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.

heejaechang avatar heejaechang commented on June 8, 2024

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
image

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.

heejaechang avatar heejaechang commented on June 8, 2024

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.

SKra00 avatar SKra00 commented on June 8, 2024

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 image

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.

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.

SKra00 avatar SKra00 commented on June 8, 2024

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.

heejaechang avatar heejaechang commented on June 8, 2024

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.

SKra00 avatar SKra00 commented on June 8, 2024

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:
image

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.

heejaechang avatar heejaechang commented on June 8, 2024

how about remote - SSH log? does it contain anything interesting there?

from pylance-release.

SKra00 avatar SKra00 commented on June 8, 2024

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.

heejaechang avatar heejaechang commented on June 8, 2024

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.

SKra00 avatar SKra00 commented on June 8, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.