kusmour wrote:

> > I can't remember: does terminate come before disconnecting? Or is it the 
> > other way around?
> 
> Disconnect docs say "The disconnect request asks the debug adapter to 
> disconnect from the debuggee (thus ending the debug session) and then to shut 
> down itself (the debug adapter).", so it has to be the last request. The 
> terminate just terminates the debuggee and, if the client&server support it, 
> the debuggee can be restarted after that.

This patch resulted in terminated event being sent twice for every session. One 
from `exited` event one from `disconnect` request. Before this patch the 
behavior was:
- Debuggee program exits
DAP msg: exited event --> terminated event --> disconnect request --> 
disconnect response
- User initiated stop debugging
DAP msg: disconnect request --> exited event --> terminated event --> 
disconnect response

Now
- Debuggee program exits
DAP msg: exited event --> terminated event --> disconnect request --> 
terminated event --> disconnect response
- User initiated stop debugging
DAP msg: disconnect request --> exited event --> terminated event --> 
disconnect response --> terminated event

(Also not sure why the terminated event comes after disconnect response in the 
second scenario)

https://github.com/llvm/llvm-project/pull/91591
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to