Remove TS debug adapter subprocess support#12008
Merged
karthiknadig merged 4 commits intoMay 27, 2020
Merged
Conversation
e3244e6 to
575afa8
Compare
89d6361
into
microsoft:logging-changes-and-drop-old-debugger
|
Kudos, SonarCloud Quality Gate passed!
|
ericsnowcurrently
left a comment
There was a problem hiding this comment.
LGTM
I left a couple comments about simplified code, but I'll leave those up to you.
Comment on lines
34
to
36
|
|
||
| let data: ChildProcessLaunchData | (AttachRequestArguments & DebugConfiguration); | ||
| if (event.event === DebuggerEvents.ChildProcessLaunched) { | ||
| data = event.body! as ChildProcessLaunchData; | ||
| } else if ( | ||
| let data: AttachRequestArguments & DebugConfiguration; | ||
| if ( | ||
| event.event === DebuggerEvents.PtvsdAttachToSubprocess || | ||
| event.event === DebuggerEvents.DebugpyAttachToSubprocess | ||
| ) { |
There was a problem hiding this comment.
With a single case we can simplify:
if (
event.event !== DebuggerEvents.PtvsdAttachToSubprocess &&
event.event !== DebuggerEvents.DebugpyAttachToSubprocess
) {
return;
}
const data = event.body! as AttachRequestArguments & DebugConfiguration;
if (Object.keys(data).length > 0) {
Comment on lines
+31
to
+32
| public async attach(data: AttachRequestArguments & DebugConfiguration, parentSession: DebugSession): Promise<void> { | ||
| const debugConfig: AttachRequestArguments & DebugConfiguration = data; |
There was a problem hiding this comment.
Suggested change
| public async attach(data: AttachRequestArguments & DebugConfiguration, parentSession: DebugSession): Promise<void> { | |
| const debugConfig: AttachRequestArguments & DebugConfiguration = data; | |
| public async attach(data: AttachRequestArguments & DebugConfiguration, parentSession: DebugSession): Promise<void> { | |
| const debugConfig = data; |
or
Suggested change
| public async attach(data: AttachRequestArguments & DebugConfiguration, parentSession: DebugSession): Promise<void> { | |
| const debugConfig: AttachRequestArguments & DebugConfiguration = data; | |
| public async attach(debugConfig: AttachRequestArguments & DebugConfiguration, parentSession: DebugSession): Promise<void> { |
| this.appShell.showErrorMessage(`Failed to launch debugger for child process ${processId}`).then(noop, noop); | ||
| } | ||
| } | ||
| /** |
There was a problem hiding this comment.
I'm loving all this deleted code. 😄
karthiknadig
added a commit
to karthiknadig/vscode-python
that referenced
this pull request
Jun 17, 2020
* Remove TS debug adapter subprocess support * Address comments
karthiknadig
added a commit
to karthiknadig/vscode-python
that referenced
this pull request
Jun 18, 2020
* Remove TS debug adapter subprocess support * Address comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is now replaced by python debug adapter sub-process handler.
Note: This does support the
ptvsd == 4.*version of the subprocess event. The behavior of those is same asdebugpysubprocess event. It is left as is, since it is possible that people will have containers with old ptvsd installed. They will get a prompt to update the debugger.