diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugModel.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugModel.java index 68cfd576315..574dd75b512 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugModel.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugModel.java @@ -90,6 +90,17 @@ public class CDebugModel final boolean stopInMain ) throws DebugException { final IDebugTarget[] target = new IDebugTarget[1]; + + // Temporary + try + { + cdiTarget.getSession().addSearchPaths( new String[] { project.getLocation().toOSString() } ); + } + catch( CDIException e ) + { + CDebugCorePlugin.log( e ); + } + IWorkspaceRunnable r = new IWorkspaceRunnable() { public void run( IProgressMonitor m ) @@ -111,15 +122,6 @@ public class CDebugModel { CDebugCorePlugin.log( e ); } - // Temporary - try - { - cdiTarget.getSession().addSearchPaths( new String[] { project.getLocation().toOSString() } ); - } - catch( CDIException e ) - { - ((CDebugElement)target[0]).targetRequestFailed( "Operation failed. Reason: ", e ); - } if ( stopInMain ) {