You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to better understand when I should fire a 'loadedSource' event.
If an adapter has the supportsLoadedSourcesRequest capability set, should I also send the 'loadedSource' event whenever I find a new source or should I delay sending any events until after the first 'loadedSources' request has been made?
At least from my testing I've seen the following DAP messages:
initialize <>
launch <>
setBreakpoint... <>
configurationDone <>
loadedSources <>
In lldb-dap at least we know some information about the sources for the debuggee around the time of the launch request but I'm not sure if I should send 'loadedSource' events before the first 'loadedSources' request, or if that request will just write over any sources I've already sent.
Any explicit call a client makes to loadedSources should overwrite any current state it has with that data as the point of truth.
Sending loadedSource eagerly is fine and is what most clients expect to maintain their UI state, but if you don't send any clients may request it explicitly.
Activity
connor4312 commentedon Jan 8, 2026
Any explicit call a client makes to
loadedSourcesshould overwrite any current state it has with that data as the point of truth.Sending loadedSource eagerly is fine and is what most clients expect to maintain their UI state, but if you don't send any clients may request it explicitly.