Ptvs: IntelliSense is not working on a large project on VS2019

Created on 4 Apr 2019  路  6Comments  路  Source: microsoft/PTVS

Hi.

I've got several Python projects of different sizes and different dependency sets.
All of them were and still are getting handled well with the latest VS2015 and VS2017 PTVS versions.
I had also tested them with VS2019 preview and everything seemed to work fine there too until as long as Preview Update 2.2. Then I took a pause in my experiments with VS2019 until this week when it was finally released. And it seems that something had changed during this time, so now there are major troubles with Python IntelliSense in there.
I've tried the Community Edition today and IntelliSense just wouldn't do anything there. Even though there are no significant warnings or errors, the class/module name colors are not not applied and no auto-completion is working either.
After that I tried Preview Update 2.2 and everything was fine until I upgraded it to Preview Update 5 when it had stopped working too.
It seems the project size is of the essence in this case. I had managed to work this issue around for a couple smaller Python 2.7 and Python 3.7 projects by removing some unneeded Python modules from the project root folders (even though those modules were never a part of .pyproj), but even in this case IntelliSence works noticeable slower in VS2019 than it was working earlier and than it is in VS2017.
I was less lucky with my biggest project (Python 2.7 + Django + AppEngine + numpy) -- whatever I do, with no errors or warning, IntelliSense just wouldn't do it's magic in VS2019 anymore 馃槩
Is this a known issue? Maybe there is a way to work this around by increasing VS performance via tweaking it's settings somehow? Turning off some of the most time/memory consuming features or something?

Code Intelligence IntelliSense bug regression

Most helpful comment

I am also running into this issue; IntelliSense works perfectly fine on this rather large project with vs2017 but nothing seems to happen in vs2019. When I open the project and initially try to autocomplete, it will say "Python source analysis is not up to date", and I can see the error list filling up with warnings about unresolved imports , so it's presumably doing _something_, but after some time it stops, says it's ready, but offers no autocomplete at all - no suggestions (not even for built-in stuff), no text coloration, just nothing. I don't think the unresolved imports are the issue because I get them in vs2017 as well. It doesn't seem to be a performance issue because the "Microsoft.PythonTools.Analyzer.exe" process is using 0 CPU and only about 240MB of RAM with no size fluctuations (I assume it's sitting there doing nothing). I'm running vs community 2019 16.0.2

All 6 comments

We've had 2 other users reporting that IntelliSense doesn't work with their projects in VS 2019 anymore.

We don't have a repro for it right now. It's also possible that it's different causes. Hopefully I can spend some time tomorrow to try and reproduce this. If someone is able to share their problematic projects, that would help a lot.

We did make changes in 16.0 Preview 4, up until then we still had the same analysis server that shipped in 15.9. A lot of bug fixes went into it, but apparently there are regressions too.

@huguesv

I cannot share my project, but I think I found a reproduce-able case which hopefully give you you some clues: VS2019IntelliSense.zip
The project contains file manage.py and it also references missing_module.py. If you open it in IDE for the first time the IntelliSense on manage.py wouldn't be working at all. If after that you exclude missing_module.py from the project and reopen it, everything should be working.
This example is not too realistic, and removing all those missing references didn't help in my case, but still this might be a starting point for your thoughts.

@eugals I can reproduce the issue where the missing file breaks IntelliSense. That was very useful, thank you very much!

I am also running into this issue; IntelliSense works perfectly fine on this rather large project with vs2017 but nothing seems to happen in vs2019. When I open the project and initially try to autocomplete, it will say "Python source analysis is not up to date", and I can see the error list filling up with warnings about unresolved imports , so it's presumably doing _something_, but after some time it stops, says it's ready, but offers no autocomplete at all - no suggestions (not even for built-in stuff), no text coloration, just nothing. I don't think the unresolved imports are the issue because I get them in vs2017 as well. It doesn't seem to be a performance issue because the "Microsoft.PythonTools.Analyzer.exe" process is using 0 CPU and only about 240MB of RAM with no size fluctuations (I assume it's sitting there doing nothing). I'm running vs community 2019 16.0.2

Regarding my prior comment: it turns out I actually had a missing file (which I missed in my initial check because it was buried in a subfolder). Removing this file from the project made IntelliSense work again, so this is the same repro @eugals reported.

I'm going to close this since the "missing files" issue is fixed in 16.1 preview releases. If there's any additional repro that don't involve missing files, please comment on https://github.com/microsoft/PTVS/issues/5214

Was this page helpful?
0 / 5 - 0 ratings