File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
lldb/tools/lldb-dap/src-ts Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,16 @@ export class LLDBDapConfigurationProvider
3939 debugConfiguration : vscode . DebugConfiguration ,
4040 _token ?: vscode . CancellationToken ,
4141 ) : vscode . ProviderResult < vscode . DebugConfiguration > {
42- // Default "pid" to ${command:pickProcess} if neither "pid" nor "program" are specified
43- // in an "attach" request.
44- if (
45- debugConfiguration . request === "attach" &&
46- ! ( "pid" in debugConfiguration ) &&
47- ! ( "program" in debugConfiguration )
48- ) {
49- debugConfiguration . pid = "${command:pickProcess}" ;
42+ if ( debugConfiguration . request === "attach" ) {
43+ // Use the process picker by default in attach mode to select the pid.
44+ if ( ! ( "pid" in debugConfiguration ) ) {
45+ debugConfiguration . pid = "${command:pickProcess}" ;
46+ }
47+ // The process picker cannot be used in "waitFor" mode.
48+ // Remove the property even if the user explicitly requested it.
49+ if ( debugConfiguration . waitFor === true ) {
50+ delete debugConfiguration . pid ;
51+ }
5052 }
5153 return debugConfiguration ;
5254 }
You can’t perform that action at this time.
0 commit comments