The general rule for ID lifetime in DAP is:
- IDs of "ephemeral" objects are valid while in the stopped state (or as Gregg said: "until the next 'continue'"). Examples are variable references, goto targets, step-in target, frames.
- IDs of long living objects are valid at least for the lifetime of the debug session (e.g. processes, threads), or even longer (breakpoints, data breakpoints).
This should be more clearly spelled out in the protocol.