Skip to content

Provide outline and breadcrumbs for read-only (generated, decompiled) sources #6341

Closed as not planned

Description

@geekley

Is your feature request related to a problem? Please describe.

I'm always frustrated when browsing a generated C# code (such as decompiled code or code from source generators) and I can't simply find a method or property by name, unless I use the search feature.

The extension is able to syntax-color the code. I can even navigate further to definitions (except for a bug when the definition is in the same file, but I digress). It should also be able to parse it just enough to generate outline / breadcrumb items. It doesn't need full compilation, just parse the file itself (no need to consider external references) to provide a syntax tree.

Describe the solution you would like

Make the document symbol provider work for read-only/decompiled/generated code too. Then members of a class will be listed on outline and I can click on it to navigate. That will also provide breadcrumbs and let me jump to the member by @name in the command palette.

Applicable Scenarios

All C# development can benefit from this. You should always be able to just navigate any code conveniently.

Often I decompile open-source libraries (e.g. Godot) to browse code referenced in order to understand it, since documentation alone is very often not enough (and finding the actual source online is too much of a hassle). Specially the class you're inheriting from. Sometimes I just want to know which of the zillion inherited methods are from the immediate base class (btw, it would be much better if they would be grouped by defining class in Intellisense completions, but that's for another feature request).

That would also be useful for other read-only/generated code, such as the ones from source generators.

Describe alternatives you've considered

The only alternative is the insufferable search feature where you go Ctrl+F and type the method name and hope there's not a million mentions of that name in comments, method calls, etc. Or you type code somewhere and use go-to-definition. It's just very inconvenient.

Additional context

TL;DR: I'm requesting this provider for read-only C# files: Show all Symbol Definitions Within a Document

Activity

  1. dibarbet commented on Sep 13, 2023

    @dibarbet
    Member

    This is caused by #5787

    Going to close this issue as a duplicate of that. Once it is resolved we should be able to provide various features in decompiled / metadata as source files, including go to def, document symbols, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions