Skip to content

Code Outline: Loading document symbols #2468

Closed

Description

Issue 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 :

Direct link to imge
Image

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.

  1. W1401: Anomalous backslash in a string: '\D.' String constant might be missing an r prefix.
  2. W1401: Anomalous backslash in a string: '\P.' String constant might be missing an r prefix.
  3. W1401: Anomalous backslash in a string: '\s.' String constant might be missing an r prefix.
  4. 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(R) Core(TM) 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

Activity

  1. aarshtalati commented on Aug 30, 2018

    @aarshtalati
    Author

    Alexandre Feblot (@afeblot) I did my research before reporting this bug. I did try to start typing (in fact, wrote a 15 line function) and still, the symbols did not appear. I am guessing that the Python language server might be unreachable? No idea.

  2. brettcannon commented on Aug 31, 2018

    @brettcannon
    Member

    Unfortunately you didn't fill out our issue template, @ablaze8 , so we don't know if the language server printed anything to the "Output" panel that could be relevant. Could you also provide a code sample? And lastly, can you try a development build to see if the latest language server fixes the issue for you?

  3. aarshtalati commented on Sep 1, 2018

    @aarshtalati
    Author

    Brett Cannon (@brettcannon) :

    Unfortunately, I used the VS code's Help --> Report Issue to submit this issue. I left both checkboxes checked (Include my system information and Include my enabled extensions). I was expecting it to collect all the info necessary, but evidently, it didn't. Which could be a whole different topic.

    1. BETA/Development build is not an option, I must use the production/stable version.

    2. I was able to reproduce the issue with a small code snippet. Here is my test code, FWIW.

    3. As you asked - below is what I see in Python logs from the output window.

    Starting Jedi Python language engine.
    ##########Linting Output - pylint##########


    Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

    Please let me know if there is something else you would need. I am happy to help.

  4. brettcannon commented on Sep 4, 2018

    @brettcannon
    Member

    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!

  5. aarshtalati commented on Sep 4, 2018

    @aarshtalati
    Author

    Looking forward to next release!

  6. aarshtalati commented on Sep 12, 2018

    @aarshtalati
    Author

    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!

  7. locked as resolved and limited conversation to collaborators on Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions