Skip to content

Support paginating 'loadedSources' #587

Open

Description

@ashgti

I've been looking at implementing loadedSources in lldb-dap but I'd like to be careful about returning to much data in a single request.

At the moment, the loadedSources request does not support pagination.

The modules request supports a simple pagination scheme where the request can include the starting offset and the number of items to include.

I wonder if it would be useful for paginating the loadedSources request to ensure we don't overload the client with data.

Activity

  1. gregg-miskelly commented on Jan 8, 2026

    @gregg-miskelly
    Member

    To be clear: I believe the loadedSources request / loadedSource event are really only meant for dynamic documents of some sort, for example the java script files in a web page. Is that your scenario? Ex: the client my team owns (Visual Studio) would not scale if you tried to create a loaded source event for every C/C++ source/header file in a large native library.

  2. ashgti commented on Jan 9, 2026

    @ashgti
    Author

    I was looking into this for lldb-dap and I have a basic prototype of this working. I thought this would be valuable for projects with disparate sets of debuggable units, e.g. llvm has a number of different binaries that it can build and test and having the loadedSources implemented shows whats actually in the target your debugging.

    In my case of lldb-dap, loading itself into the debugger its reporting 2871 primary sources (e.g. excluding headers and some transitive support files like swig generated sources / headers) and around 7k sources total.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions