@@ -526,15 +526,6 @@ export class DebugConfigurationProvider implements vscode.DebugConfigurationProv
526526 }
527527 }
528528
529- public async getLaunchConfigs ( folder : vscode . WorkspaceFolder | undefined ) : Promise < vscode . WorkspaceConfiguration [ ] | undefined > {
530- let configs : vscode . WorkspaceConfiguration [ ] | undefined = vscode . workspace . getConfiguration ( 'launch' , folder ) . get ( 'configurations' ) ;
531- if ( ! configs ) {
532- return undefined ;
533- }
534- configs = configs . filter ( config => ( config . name && config . type === DebuggerType . cppvsdbg || config . type === DebuggerType . cppdbg ) && config . request === "launch" ) ;
535- return configs ;
536- }
537-
538529 public async buildAndRun ( textEditor : vscode . TextEditor ) : Promise < void > {
539530 // Turn off the debug mode.
540531 return this . buildAndDebug ( textEditor , false ) ;
@@ -553,36 +544,6 @@ export class DebugConfigurationProvider implements vscode.DebugConfigurationProv
553544 if ( os . platform ( ) === 'win32' ) {
554545 configs = configs . concat ( await this . provideDebugConfigurationsForType ( DebuggerType . cppvsdbg , folder ) ) ;
555546 }
556-
557- if ( folder ) {
558- // Get existing debug configurations from launch.json.
559- let existingConfigs : vscode . DebugConfiguration [ ] | undefined = ( await this . getLaunchConfigs ( folder ) ) ?. map ( config =>
560- ( { name : config . name ,
561- type : config . type ,
562- request : config . request ,
563- detail : config . detail ? config . detail : localize ( "pre.Launch.Task" , "preLaunchTask: {0}" , config . preLaunchTask ) ,
564- preLaunchTask : config . preLaunchTask ,
565- existing : TaskConfigStatus . configured
566- } ) ) ;
567-
568- // Remove the detected configs that are already configured once in launch.json.
569- const dedupExistingConfigs : vscode . DebugConfiguration [ ] = configs . filter ( detectedConfig => {
570- let isAlreadyConfigured : boolean = false ;
571- if ( existingConfigs && existingConfigs . length !== 0 ) {
572- for ( const config of existingConfigs ) {
573- if ( config . name === detectedConfig . name &&
574- ( config . preLaunchTask as string ) === ( detectedConfig . preLaunchTask as string ) &&
575- config . type === detectedConfig . type &&
576- config . request === detectedConfig . request ) {
577- isAlreadyConfigured = true ;
578- break ;
579- }
580- }
581- }
582- return ! isAlreadyConfigured ;
583- } ) ;
584- configs = existingConfigs ? existingConfigs . concat ( dedupExistingConfigs ) : dedupExistingConfigs ;
585- }
586547
587548 const defaultConfig : vscode . DebugConfiguration [ ] = configs . filter ( ( config : vscode . DebugConfiguration ) => ( config . hasOwnProperty ( "isDefault" ) && config . isDefault ) ) ;
588549 interface MenuItem extends vscode . QuickPickItem {
0 commit comments