PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

Intellisense forgets imports during editing

Open niwax opened this issue 2 years ago • 1 comments

Describe the bug When a project is first opened, imports work as expected both from inside the same project as well as installed packages: image

After an hour or two of work, they are marked as not resolved and other functionality like "Go to definition" is also broken. Only builtin packages are not impacted: image

The behaviour extends to the entire solution, including opening and closing files. After restarting VS, everything works again.

Steps to Reproduce Unfortunately, I haven't been able to find a consistent trigger for this behaviour. It happens regardless of whether the project has been run, whether a lot of files are edited or VS is simply sitting idle.

Configuration information (If you are providing a diagnostics file (see below), skip this section) VS Version: 17.2.2 PTVS version: 17.0.22089.1 Python version: 3.8 and 3.9

niwax avatar May 25 '22 17:05 niwax

I just found out that this issue persist even through reloading the project, eg. after a Git pull. Only restarting Visual Studio fixes it temporarily.

Unfortunately, it has now also started happening as often as every five minutes.

niwax avatar Jun 20 '22 10:06 niwax

dupe of https://github.com/microsoft/PTVS/issues/7068

StellaHuang95 avatar Jan 18 '23 01:01 StellaHuang95