PTVS
PTVS copied to clipboard
Changing error messages - differences in reported errors between VS and pyright cli
Describe the bug After starting n (1<= n <= 10) debug sessions, the reported errors change. Usually at this point in time, the Output-Pylance entry in the drop-down menu disappears
Steps to Reproduce
Open project - Errors reported:
Start debug sessions. After a couple of runs, error reporting will change:
(this has nothing to do with the current problems with flask, another project not using flask exhibits the same behavior)
The change in error reporting always happens, surprisingly this time the output-pylance entry did not disappear:
Notable difference is the line saying "no source files found"
Editing code yields new error messages but only on the new baseline. The initially reported errors are still there but do not get reported.
Expected behavior Stable and reliable reporting of errors
Additional context and screenshots I have not been able to force output-pylance to disappear, after some debug sessions it is gone.
Configuration information (If you are providing a diagnostics file (see below), skip this section)
`
Some more observations. Step 1: I did run pyright from the command line which yielded numerous errors none of which were being reported when I did close the project in VS.
Step 2: Opening the project in VS yielded no errors although the one py file which got opened had an error reported in step 1.
Step 3: Opening other py-files with errors being reported in step 1 caused the very same errors to be reported for the newly opened files (but not for the one opened in step 1). Close files.
Step 4: Starting some debug sessions until pylance-entry disappears from Output
Step 5: Re-Opening the files from step 3 or other files reported in step 1 does not cause any errors to be reported
The error reporting in VS is not in sync with pylance. Also, I did notice that VS only checks py-files opened in VS but not files never opened. Running pylance gives a full report of the project, VS error reporting does not and this is quite misleading if files are being edited by different users using different environments.
fwiw I forgot to mention as this happens really seldom. I just had an instance of a git commit removing pylance from the output drop-down