Skip to content

Commit ba9634b

Browse files
SougandhSfedejeanne
authored andcommitted
Fix launch not found error
This commit fixes launch not found error while switching from modified launch config tab to new launch config tab. Fixes : #2003
1 parent 3bcd4f3 commit ba9634b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2011 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -61,6 +61,11 @@ protected void performAction() {
6161
// Construct a new config of the selected type
6262
if (object instanceof ILaunchConfiguration config) {
6363
try {
64+
if (!config.exists()) {
65+
ILaunchConfiguration[] launches = DebugPlugin.getDefault().getLaunchManager()
66+
.getLaunchConfigurations();
67+
config = launches[launches.length - 1];
68+
}
6469
type = config.getType();
6570
} catch (CoreException e) {
6671
errorDialog(e);

0 commit comments

Comments
 (0)