-
Notifications
You must be signed in to change notification settings - Fork 498
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
Fix up debugger configuration resolvers #4888
Conversation
5dcc6d7
to
e9cb397
Compare
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.
LGTM
e9cb397
to
5678505
Compare
Still happening to me in a async pickPSHostProcess() {
await this.getLanguageClient();
const items = [];
const response = await this.languageClient?.sendRequest(GetPSHostProcessesRequestType, {});
for (const process3 of response ?? []) {
let windowTitle = "";
if (process3.mainWindowTitle) {
windowTitle = `, ${process3.mainWindowTitle}`;
}
items.push({
label: process3.processName,
description: `PID: ${process3.processId.toString()}${windowTitle}`,
processId: process3.processId
});
} Let me try it in extension debug |
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.
From Code Review
423a92b
to
eb87b2e
Compare
Now also resolves the root of #4699. |
eb87b2e
to
e1b63cc
Compare
Ok so we removed the notion of IDs (which are integers) being strings because that broke serialization with recent updates. But on inspection we realized the whole point was to be able to say "current" and have the attach configuration attach to the currently running Extension Terminal. Except that this was an unsupported, half-baked scenario (sure, it attached, but it couldn't actually be debugged properly). So now that throws warnings in both the client and server. The defaults for `processId` and `runspaceId` where changed to `null` (again, now they're just integers) which means to query for them. The supplied but half-baked configuration was removed.
This makes a lot more sense and fixes a long-standing bug. Also cleaned up a lot while at it. 1. `SessionManager` is created and the features are injected into the session manager with the intention of them being able to "register" their language client event handlers in the period between when the client is created and when it is started. 2. For each feature, if it gets to a point where it needs the language client, we want them to wait on a promise for the "started" client to be provided from the session manager before continuing. 3. Once it is started, the session manager passes the client to `LanguageClientConsumer` which resolves the promise for the features so they can continue.
e1b63cc
to
d429beb
Compare
Wow this was a mess. Needs PowerShell/PowerShellEditorServices#2130, and I'm a little worried about breaking changes but supplying
"current"
toprocessId
is special-cased to still work (well, throw an appropriate warning), since the launch configuration types only generate warnings.Ok so we removed the notion of IDs (which are integers) being strings because that broke serialization with recent updates. But on inspection we realized the whole point was to be able to say "current" and have the attach configuration attach to the currently running Extension Terminal. Except that this was an unsupported, half-baked scenario (sure, it attached, but it couldn't actually be debugged properly). So now that throws warnings in both the client and server. The defaults for
processId
andrunspaceId
where changed tonull
(again, now they're just integers) which means to query for them. The supplied but half-baked configuration was removed.Fixes #4843