When I close debugged Firefox window, debugging session in Theia remains open until Theia reload.
OS and Theia version:
Ubuntu 19.10, Theia 1.0.0
Diagnostics:
Hmm, this may be related:
Error: the debug session connection is disposed, id: 99f3c7c4-6450-4881-87a7-d33c486a9f99 debug-session-connection.ts:129:18
This may relate too: if I reload Theia without ending the debug session, debugged browser (launch option) is still open, but debug session in Theia is closed. I think it should restore that session, or, at least, gracefully end it, not leaving processes running after user has left. Maybe this is another issue, ping me if it should be reported separately.
This may relate too: if I reload Theia without ending the debug session, debugged browser (launch option) is still open, but debug session in Theia is closed. I think it should restore that session, or, at least, gracefully end it, not leaving processes running after user has left. Maybe this is another issue, ping me if it should be reported separately.
Currently it is expected that the debug session should be terminated, but we should not leave orphan processes if they were started not by a user, but the debut adapter.
We have an issue to support shared debug sessions: https://github.com/eclipse-theia/theia/issues/3361 It would allow to preserve debug sessions between page reloads as well. Please upvote there for a feature request.
@akosyakov probably processes can be killed until #3361 is implemented. Then they'll be shared. What do you think about this idea?
@sh7dm We are already killing the entire process tree. I will need to debug to understand why this process cannot be killed.
Killing happens here: https://github.com/eclipse-theia/theia/blob/14531578a1eac6af55c6177ea857d39c38c9f09b/packages/plugin-ext/src/hosted/node/hosted-plugin-process.ts#L122 There are docs how to debug Theia if someone wants to investigate: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#debugging
Same bug occurs when the attach request if declined
Same bug occurs when the attach request if declined
The are 2 modes of debugging: launch and attach. For launch mode the debug adapter is responsible to start a program on user behalf and terminate it. But for attach a user is responsible for it, i.e. when the session is ended it is expected that a user program is still running.
But someone should try to reproduce to understand which process do you mean hanging. If it is not a user program, but debug adapter, then it is a bug.
Chrome Devtools extension doesn't do so. When I close Chrome, the session is stopped.