question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extension freezes when using Pylint and WSL

See original GitHub issue

Note: A previous issue I made regarding this issue here was closed, and aeschli requested that I re-posted it here.

Since posting the original issue, I’ve disabled pylint and similar options which solves the freezing. I’ve recently enabled the PyLance extension to gain back the ability to follow references in large files using CTRL + CLICK and some basic syntax checking/auto importing. This seems to run fine, but enabling the default pylint functions results in freezing again. I’ve also since upgraded VSCode a few times and I’m currently running the latest version:

[Window Title]
Visual Studio Code

[Main Instruction]
Visual Studio Code

[Content]

Version: 1.51.1 (user setup)
Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
Date: 2020-11-10T23:34:32.027Z (2 days ago)
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041

[OK] [Copy]

I’ve since also upgraded to use Python 3.8 instead of Python 2.7, not sure if that matters but that might narrow down the search.

Original issue information:

Hard to reproduce, some days it freezes after a few seconds, sometimes after a few minutes, and sometimes it never freezes.

When i say freeze, I mean I can still edit, but I can’t use the debugger (start/stop/jump in code), use git (extensions), type in the terminal/console window. Saving a file, depending on the size, takes a very long time (>5/10 seconds). Search in workspace/folders/files completely stops working, search in current/opened file(s) still works.

Rebooting PC does not help usually. It’s very, very random and sometimes it can last an entire day (even with pc/vscode restarts), other times it can be gone after a few freezes, or sometimes it never happens.

Extension version: 0.42.4 VS Code version: Code 1.43.2 (0ba0ca52957102ca3527cf479571617f0de6ed50, 2020-03-24T07:38:38.248Z) OS version: Windows_NT x64 10.0.19041 Remote OS version: Linux x64 4.4.0-19041-Microsoft

System Info
Item Value
CPUs Intel® Core™ i7-8700K CPU @ 3.70GHz (12 x 3696)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.93GB (19.06GB free)
Process Argv
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 4.4.0-19041-Microsoft
CPUs Intel® Core™ i7-8700K CPU @ 3.70GHz (12 x 3701)
Memory (System) 31.93GB (19.06GB free)
VM 0%

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
yellowtailfancommented, Nov 21, 2020

Glad to hear that Pylance works for you, especially since our team’s development efforts have shifted to support it.

Yes that’s great! I didn’t notice that Pylance was a Microsoft extension, and I found the extension description a bit confusing. But then I googled it and found the blog post saying it’s going to replace the default Python extension. Good news!

running Remote Development on a local WSL2 distro

Is there a reason why you’re not using the Remote WSL extension?

Oh sorry, yes that’s what I’m doing. It works nicely, I’m very impressed with that extension.

1reaction
yellowtailfancommented, Nov 20, 2020

I have found the default Python helper experience in VS Code quite laggy and non-functional as well, and the scripts I’m working with are much shorter than 10k lines. It happens for me for scripts of all sizes, even only 100 lines or so.

I am up to date with the main VS Code releases, running Remote Development on a local WSL2 distro. But the Python lag has been happening basically since I started using VS Code last year, with lots of different scripts, modules and environments.

So I suggest bearing in mind that this issue may affect many VS Code users who code in Python. It doesn’t slow down actual editing operations, it just makes many nice VS Code features appear broken, like Ctrl-Click to go to definition, or auto-completing function names, or quick lookup of function parameters.

Switching to Pylance has made the experience much snappier, so it is now similar to the default VS Code JavaScript experience. Thanks @TomGrobbe for that recommendation!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure an interpreter using WSL - PyCharm - JetBrains
stdin is explicitly closed for Python process. Debugger doesn't work properly if firewall is not opened for WSL IP.
Read more >
Wsl Freezes on launch - Microsoft Q&A
Sometimes Wsl freezes first try, so I'm pretty sure it's not a problem with the hotkey, I've tried adjusting the speed of the...
Read more >
Error message "Linter pylint is not installed" - Stack Overflow
Check the path Pylint has been installed to, by typing which pylint on your terminal. You will get something like: /usr/local/bin/pylint.
Read more >
VS Code causes 17.10, 18.04 randomly and completely freeze
So try launching vscode with extensions disabled (code --disable-extensions) and see if it still happens. If it doesn't track down the ...
Read more >
August 2022 - Visual Studio Code
TypeScript livestreams - Watch TS "Crash Course" or "Tips and Tricks" on YouTube. Live Preview extension - Live Preview now supports multi-root web...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found