Resuming newly stopped thread crashes Kotlin Debug Adapter #743
-
Hello, Thanks for a great plugin! ProblemI am trying to get nvim-dap to work with Kotlin Debug Adapter and am experiencing issues when setting breakpoints and stepping over/ continuing these. The errors I get is the same as described in an earlier issue. At first, I also thought that this is an issue with the Kotlin Debug Adapter and have posted an issue there going into more detail. However, after some digging around I think the issue indeed is with the nvim-dap. Going through the logs I've found this relevant snippet.
Here the nvim-dap continues execution through the QuestionsSo, to the core of the post.
ConfigFor completion here is my nvim-dap kotlin config. Hardcoded paths and mainClass for testing purposes.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
If you want to set it for all debug adapters, or to set it only for kotlin:
You're right, this setting should be documented. It's only auto-resumed if another thread is already stopped. The idea is that if you're debugging a multithreaded application you'll have only one thread stop at the current breakpoint while other threads will continue processing. The reason this is the default is mainly because a) it was initially easier to implement and b) I found this behavior to be more useful. But this should never make the debugging not work, so there seems to be an issue either on the kotlin side or on the nvim-dap side. Could you share a log where the communication before the "Received stopped event, but main is already stopped. Resuming newly stopped thread. To disable this set the |
Beta Was this translation helpful? Give feedback.
-
Thanks for the explanation! Setting the Here are the logs before the "Resuming newly stopped...". I've tried to include the spawning of threads. Here is a gist of the entire log.
|
Beta Was this translation helpful? Give feedback.
auto_continue_if_many_stopped
must be set in thedefaults
table. Either:If you want to set it for all debug adapters, or to set it only for kotlin:
You're right, this setting should be documented.
It's only auto-resumed if another thread is already stopped. The idea is that if you're debugging a multithreaded application you'll have only one thread stop at the current breakpoint while other threads will continue processing.
The reason this is the default is mainly because a) it was initially easier to implement and b) I found this behavior…