Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug: clean up debug session management #10164

Closed
tsmaeder opened this issue Sep 24, 2021 · 7 comments · Fixed by #10333
Closed

debug: clean up debug session management #10164

tsmaeder opened this issue Sep 24, 2021 · 7 comments · Fixed by #10333
Assignees
Labels
debug issues that related to debug functionality quality issues related to code and application quality

Comments

@tsmaeder
Copy link
Contributor

Bug Description:

Whe only remove debug sessions when the debuggee sends an "exited" event. However, when we press the "stop" button in the UI, we're sending a 'terminate' request to the debuggee...this just asks the debuggee to terminate the debug session not to exit the process. So we end up with a stale debug session we cannot get rid of.

Steps to Reproduce:

  1. Install the mock debug extension (probably attaching to a long-running java process works, as well) (see Add DebugAdapterNamedPipeServer and DebugAdapterInlineImplementation #10163 for instructions)
  2. Launch a moch debug sessions
  3. Press the "stop" button on the debug session
  4. Observe. the session remains.

I believe we should get rid of the debug session upon 'terminated', not 'exited'.

Additional Information

  • Operating System:
  • Theia Version: 1.18.0 master
@tsmaeder tsmaeder added the debug issues that related to debug functionality label Sep 24, 2021
@vince-fugnitto vince-fugnitto changed the title Clean up debug session managment. debug: clean up debug session management Sep 24, 2021
@vince-fugnitto vince-fugnitto added the quality issues related to code and application quality label Sep 24, 2021
@svor
Copy link
Contributor

svor commented Oct 5, 2021

Can see this problem when running Theia with redhat.java-0.82.0.vsix and vscode-java-debug-0.35.0.vsix

screencast-localhost_3000-2021.10.04-17_50_00.mp4

@tsmaeder
Copy link
Contributor Author

tsmaeder commented Oct 8, 2021

@alvsan09 are you going to work on this, because I was going to.

@alvsan09
Copy link
Contributor

alvsan09 commented Oct 8, 2021

@alvsan09 are you going to work on this, because I was going to.

I started looking into it but I have been a bit distracted from it,
It's a good time to take it over if you like 👍
Thanks for reaching out !

@tsmaeder tsmaeder assigned tsmaeder and unassigned alvsan09 Oct 8, 2021
@tsmaeder
Copy link
Contributor Author

tsmaeder commented Oct 8, 2021

Stole it ;-)

@msujew
Copy link
Member

msujew commented Oct 18, 2021

@tsmaeder do you plan to finish this during this month? One of our customers experiences an issue related to this (in this case, the debuggee sometimes throws an exception when trying to terminate the session, resulting in Theia never disposing the session, see arduino/arduino-ide#527)

If you don't have time, I'd like to take this on.

@tsmaeder
Copy link
Contributor Author

I'm currently working on a fix, but t.b.h it's not obvious how to track the lifecycle of nested debug sessions, debug adapters and debuggees. Still seeing lots of surprises.

@tsmaeder
Copy link
Contributor Author

@msujew If terminating the debuggee fails, isn't it correct behaviour to keep the debug session? What behaviour do you expect? What happens when the debuggee is killed by hand?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug issues that related to debug functionality quality issues related to code and application quality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants