-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add support for "lifecycleManagedByParent" #51
Add support for "lifecycleManagedByParent" #51
Conversation
Forwards lifecycle events to parent session where applicable and changes the behavior of compound sessions to behave same way. Contributed on behalf of ST Microelectronics Signed-off-by: Thomas Mäder <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks! Code looks good to me.
What I've successfully tested is below.
Additionally to that, it may be worth creating a minimal VS Code extension based on mock-debug and compare that with how VS Code behaves for the same minimal extension. What do you think @tsmaeder?
What I've tested
Setup
- Launch Electron Theia with ms-vscode.js-debug-1.61.0.vsix
- Out of Electron Theia start launch configs for browser Theia
- Scenarios below in comparison with VS Code
Launch Config: Browser backend only (not compound)
Theia
- stop -> stops all
- restart -> restarts all
VS Code
- stop -> stops all
- restart -> restarts all
Launch Config: Compound Launch Browser backend and frontend (with stopAll = false
)
Theia
- stop -> stops parent process but not browser
- restart -> restarts parent process but not browser
VS Code
- stop -> stops parent process but not browser
- restart -> restarts parent process but not browser
Launch Config: Compound Launch Browser backend and frontend (with stopAll = true
)
Theia
- stop -> stops parent process AND browser
- restart -> restarts parent process but not browser
VS Code
- stop -> stops parent process AND browser
- restart -> restarts parent process but not browser
I think the only scenario we can't cover with the js-debug extension is the one where there is a process tree where some have the flag One bunch of scenarios I didn't see in your testing is when the processes are not terminated by hand, but terminate themselves (for example, killing a subprocess by hand). The lifecycle events should not propagate in this case (if I read the doc correctly). |
Right, good point! I've tested that now too. Theia
VS Code
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the nice work!
Signed-off-by: Thomas Mäder <[email protected]>
Merged upstream with eclipse-theia#11751 |
What it does
Adds support for the
lifecycleSupportedByParent
flag on debug session. Fixes eclipse-theia#11511How to test
Contributed on behalf of ST Microelectronics
Review checklist
Reminder for reviewers