-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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: add support for stopDebugging
api
#10638
Conversation
The commit adds support for the `stopDebugging` vscode api. The api can accept a debug session, and if none are provided it will terminate all active sessions. Signed-off-by: vince-fugnitto <[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.
The code looks good. With the example plugin, I was able to stop exactly one session or the all sessions as described.
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.
I have tested the two scenarios stopping the active session as well as all sessions and it works as expected 👍
The code looks good to me as well !!
} | ||
// Terminate all sessions if no session is provided. | ||
for (const session of this.sessionManager.sessions) { | ||
this.sessionManager.terminateSession(session); |
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.
When $stopDebugging
is called with a sessionId
, the promise resolves when the session was terminated (or rejected). The promise might resolve earlier when calling the function without the sessionId
arg. Maybe an await
is missing from here.
Sorry for the noise if I am wrong 😊
What it does
The pull-request adds support for the
stopDebugging
VS Code API.The API terminates the session if provided, else it will terminate all sessions.
How to test
theia
as a workspacerun mocha tests
)Debug Test: Stop Active Session
) - the session should terminaterun mocha tests
multiple times with different*.spec.ts
files)Debug Test: Stop All Sessions
) - all sessions should terminateReview checklist
Reminder for reviewers
Signed-off-by: vince-fugnitto [email protected]