Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outline View not updated when adding or removing items #4693

Closed
pslizik-ibl opened this issue Aug 7, 2023 · 8 comments
Closed

Outline View not updated when adding or removing items #4693

pslizik-ibl opened this issue Aug 7, 2023 · 8 comments
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@pslizik-ibl
Copy link

Type: Bug

The Outline View is not updated when adding or removing functions (methods, classes...). The only "workaround" I'm aware of is to close and re-launch VSCode.

The problem manifests itself with Python files. I didn't try it with other languages.

The following is my configuration. However, the problem has been confirmed also on my colleague's computer.

VS Code version: Code 1.80.2 (2ccd690cbff1569e4a83d7c43d45101f817401dc, 2023-07-27T20:41:52.615Z)
OS version: Linux x64 5.15.0-78-generic
Modes:

Extensions (20)
Extension Author (truncated) Version
Bookmarks ale 13.4.1
arepl alm 2.0.5
shell-syntax bma 1.0.5
scratchpads bue 1.0.0
better-mako cha 0.1.1
vscode-highlight fab 1.8.0
copilot Git 1.100.306
copilot-labs Git 0.14.884
join-lines-context-aware ian 1.0.1
rainbow-csv mec 3.7.0
black-formatter ms- 2023.4.1
python ms- 2023.12.0
vscode-pylance ms- 2023.8.10
remote-ssh ms- 0.102.0
remote-ssh-edit ms- 0.86.0
remote-explorer ms- 0.4.1
vscode-xml red 0.26.1
highlight-words rsb 0.1.4
ayu tea 1.0.5
rainbow-tags vol 0.4.1
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
vscaat:30438848
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30803845
3biah626:30602489
f6dab269:30613381
2i9eh265:30646982
showlangstatbar:30737416
vsctsb:30748421
a2ce3375:30757347
24365598:30736109
pythonfmttext:30731395
pythoncmv:30756943
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
gsofb:30804716
pythonnosmt12:30797651
pythonnoceb:30805159
e537b577:30795824
dsvsc013:30795093
dsvsc014:30804076
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Aug 7, 2023
@kimjansheden
Copy link

I got the same problem. Another workaround I discovered where you don't have to close and re-open VS Code is to leave Explorer view and go to any other view, e.g. Search. Then go back to Explorer view and the outline will be updated. I automated this jumping back and forth with a keyboard shortcut.

@rchiodo
Copy link
Contributor

rchiodo commented Aug 30, 2023

This seems to work?

updateoutline

Perhaps you're not just updating a function though. Does it work for say typescript?

@pslizik-ibl
Copy link
Author

pslizik-ibl commented Sep 4, 2023

I've tried it again today, and it works (as of VSCode 1.81.1 and PyLance v2023.8.50). Confirmed also with my colleague who had the same problem.
@kimjansheden - can you try it?
@rchiodo - shall I close the ticket, or do you want me to provide some more information (logs, whatever)?

@rchiodo
Copy link
Contributor

rchiodo commented Sep 5, 2023

Thanks for verifying. I'll close now.

@rchiodo rchiodo closed this as completed Sep 5, 2023
@kimjansheden
Copy link

I've tried it again today, and it works (as of VSCode 1.81.1 and PyLance v2023.8.50). Confirmed also with my colleague who had the same problem.
@kimjansheden - can you try it?

@pslizik-ibl I can also confirm that it works now, thank you for notifying me!

@marcel-goldschen-ohm
Copy link

marcel-goldschen-ohm commented Feb 9, 2024

I'd like to reopen this as it has been a VERY annoying problem for me for some time now, and it still persists. I'm assuming it's due to Pylance, but not 100% sure. Regardless, having to close and reopen VSCode to get the outline back for a python file is extremely annoying. Worse, when the outline is dysfunctional, all code folding is dysfunctional as well.

Note that sometimes the outline shows all functions/etc., but when clicking on an outline item you are taken to a line of code that was previously where that function existed, but no longer where it is in the updated file. Very weird behavior, but maybe a hint as to what is going on. Needless to say, code folding now folds the code in a nonsensical manner.

Version: 1.86.0 (Universal)
Commit: 05047486b6df5eb8d44b2ecd70ea3bdf775fd937
Date: 2024-01-31T10:29:15.765Z
Electron: 27.2.3
ElectronBuildId: 26495564
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin x64 21.6.0

@rchiodo
Copy link
Contributor

rchiodo commented Feb 9, 2024

@marcel-goldschen-ohm you're better off opening a new issue with repro steps. This still works fine for me, so something else must be going wrong. It might be another extension interfering, or something different about your code from mine.

@marcel-goldschen-ohm
Copy link

Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

5 participants