diff options
author | Ken Ryall | 2006-09-25 04:05:29 +0000 |
---|---|---|
committer | Ken Ryall | 2006-09-25 04:05:29 +0000 |
commit | ecfd5b8e3b5d50eae265082df64e4ef6cd9155b0 (patch) | |
tree | b9166e4276910a65a58491bddad25157e5693840 /launch | |
parent | bc7e82f18646efabc7bb083067c58e7a34e3b5ce (diff) | |
download | org.eclipse.cdt-ecfd5b8e3b5d50eae265082df64e4ef6cd9155b0.tar.gz org.eclipse.cdt-ecfd5b8e3b5d50eae265082df64e4ef6cd9155b0.tar.xz org.eclipse.cdt-ecfd5b8e3b5d50eae265082df64e4ef6cd9155b0.zip |
Bug 158391. Ensure the default debugger pref has been set, preventing the "No such debugger" error message for new launch configurations created before the MI plug-in has been loaded.
Diffstat (limited to 'launch')
-rw-r--r-- | launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java index c4cf7dd12e5..e9a1b02c652 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java @@ -26,6 +26,7 @@ import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; import org.eclipse.cdt.debug.core.ICDebugConfiguration; +import org.eclipse.cdt.debug.core.ICDebugConstants; import org.eclipse.cdt.launch.internal.ui.AbstractCDebuggerTab; import org.eclipse.cdt.launch.internal.ui.LaunchMessages; import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin; @@ -130,6 +131,12 @@ public class CDebuggerTab extends AbstractCDebuggerTab { public CDebuggerTab(boolean attachMode) { fAttachMode = attachMode; + // If the default debugger has not been set, use the MI debugger. + // The MI plug-in also does this, but it may not have been loaded yet. Bug 158391. + ICDebugConfiguration dc = CDebugCorePlugin.getDefault().getDefaultDefaultDebugConfiguration(); + if (dc == null) { + CDebugCorePlugin.getDefault().getPluginPreferences().setDefault(ICDebugConstants.PREF_DEFAULT_DEBUGGER_TYPE, "org.eclipse.cdt.debug.mi.core.CDebuggerNew"); //$NON-NLS-1$ + } } public void createControl(Composite parent) { @@ -214,6 +221,10 @@ public class CDebuggerTab extends AbstractCDebuggerTab { } config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, false); config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, false); + ICDebugConfiguration dc = CDebugCorePlugin.getDefault().getDefaultDebugConfiguration(); + if (dc != null) { + config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, dc.getID()); + } } public void initializeFrom(ILaunchConfiguration config) { @@ -463,4 +474,4 @@ public class CDebuggerTab extends AbstractCDebuggerTab { protected void setInitializeDefault(boolean init) { super.setInitializeDefault(init); } -} +}
\ No newline at end of file |