Code Outline: Loading document symbols
See original GitHub issueIssue Type: Bug
-
VS Code version: 1.26.1 (Commit: 493869ee8e8a846b0855873886fc79d480d342de)
-
Extensions (1) python | ms- | 2018.7.1 – | – | –
-
OS and version: Ubuntu 18.04.1 LTS Kernel Linux 4.15.0-33-generic x86_64
-
Python version Anaconda, Inc. Python 2.7.15 (base)
Actual behavior
I did not notice until later, that VS Code now has the code outline/code structure view. When I tried to expand it, it said “Loading document symbols for '<current_file_name>.py”
Screenshot :
Expected behavior
The code outline should parse the currently open code file and populate the symbols regardless if the user has just created code file or it already existed. The code might or might not compile but code outline should be able to enlist all the symbols in the order they appear in the code. The user should also be able to sort this list alphabetically.
Steps to reproduce:
-
I tried to open an existing file on a current project, created with VS Code to start with.
-
Next, I expanded the “Outline” window by clicking on it.
-
Not sure it matters, but I gave my consent when VS Code asked me to install/update pylint. It executed this command for me:
pip install -U "pylint<2.0.0"
Logs
There is nothing in the output or terminal window. Pylint did notice the following issues with my code. I do not think those are relevant to this issue, but I have included them here, anyway.
- W1401: Anomalous backslash in a string: ‘\D.’ String constant might be missing an r prefix.
- W1401: Anomalous backslash in a string: ‘\P.’ String constant might be missing an r prefix.
- W1401: Anomalous backslash in a string: ‘\s.’ String constant might be missing an r prefix.
- W1401: Anomalous backslash in a string: ‘\S.’ String constant might be missing an r prefix.
VS Code version: Code 1.26.1 (493869ee8e8a846b0855873886fc79d480d342de, 2018-08-16T18:34:20.517Z) OS version: Linux x64 4.15.0-33-generic
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-2820QM CPU @ 2.30GHz (8 x 2849) |
GPU Status | 2d_canvas: enabled checker_imaging: disabled_off flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: disabled_software rasterization: disabled_software video_decode: unavailable_software video_encode: unavailable_software webgl: enabled webgl2: enabled |
Load (avg) | 7, 3, 2 |
Memory (System) | 15.58GB (8.53GB free) |
Process Argv | /usr/share/code/code --unity-launch |
Screen Reader | no |
VM | 0% |
Extensions (1)
Extension | Author (truncated) | Version |
---|---|---|
python | ms- | 2018.7.1 |
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
I can confirm that on Ubuntu release package, for version 1.27.1 (Commit 5944e81f3c46a3938a82c701f96d7a59b074cfdc) has this fixed. I also was able to verify this to be working with Windows 10. Thank you!
Unfortunately the “Report Issue” command is for VS Code itself and not us (I believe they are working to make it extensible for extension modules, but it’s not there yet).
Anyway, I can confirm that this will be fixed in our next release!