JDevlieghere wrote:

> > (on Windows)?
> 
> That's the hard part 😅. I tried to get 
> https://github.com/llvm/llvm-project/blob/main/lldb/test/API/tools/lldb-dap/threads/TestDAP_threads.py
>  to run on Windows, but it's too flaky. From my observation, the debug 
> adapter is too fast at launching the program before the test can set the 
> breakpoints. If I understand DAP correctly, then the server can send 
> breakpoint requests after the connection has been initialized, but that 
> doesn't seem to be easily doable in the tests right now[?] as 
> `DAPTestCaseBase.launch` already does an initialization request (and launch 
> request). Ideally, one could set the breakpoints inbetween.

Ack. One solution could be to hand-roll your launch sequence so you can send 
the requests in the order that reproduces the issue. The other alternative is 
to extend the helpers to make them support your use case. Without knowing what 
exactly you need I'm leaning towards the latter as that means everyone can 
benefit from it and if something changes in the launch sequence, we don't need 
to update multiple places. 

> I don't know why, but for some reason, my VS Code sends the launch request 
> before existing breakpoints with lldb-dap, but when using the MSVC debugger 
> from the cpptools (vsdbg), the breakpoints are sent before the launch request 
> (as documented in [launch 
> sequencing](https://microsoft.github.io/debug-adapter-protocol/overview#launch-sequencing)).

The launch sequence is in parallel. Is it possible that the two debug adapter 
implements are handling them in different orders? It took me a while to realize 
this. I found this diagram enlightening: 
https://github.com/microsoft/vscode/issues/4902#issuecomment-368583522

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

Reply via email to