diff --git a/Modules/Debuggers/ProjectCenter/GDBWrapper.m b/Modules/Debuggers/ProjectCenter/GDBWrapper.m index 2bef74a..b63d72e 100644 --- a/Modules/Debuggers/ProjectCenter/GDBWrapper.m +++ b/Modules/Debuggers/ProjectCenter/GDBWrapper.m @@ -91,6 +91,11 @@ } } +- (BOOL)debuggerStarted +{ + return debuggerStarted; +} + - (void)setFont:(NSFont *)aFont { if (font != aFont) diff --git a/Modules/Debuggers/ProjectCenter/PCDebugger.m b/Modules/Debuggers/ProjectCenter/PCDebugger.m index 0de5abc..c63a590 100644 --- a/Modules/Debuggers/ProjectCenter/PCDebugger.m +++ b/Modules/Debuggers/ProjectCenter/PCDebugger.m @@ -179,7 +179,8 @@ NSString *PCDBDebuggerStartedNotification = @"PCDBDebuggerStartedNotification"; - (void) show { [debuggerWindow makeKeyAndOrderFront: self]; - [self startDebugger]; + if (![debuggerWrapper debuggerStarted]) + [self startDebugger]; } - (void) startDebugger diff --git a/Modules/Debuggers/ProjectCenter/PCDebuggerWrapperProtocol.h b/Modules/Debuggers/ProjectCenter/PCDebuggerWrapperProtocol.h index 1ce53cb..986327f 100644 --- a/Modules/Debuggers/ProjectCenter/PCDebuggerWrapperProtocol.h +++ b/Modules/Debuggers/ProjectCenter/PCDebuggerWrapperProtocol.h @@ -42,6 +42,8 @@ - (PCDebugger *)debugger; - (void)setDebugger:(PCDebugger *)dbg; +- (BOOL)debuggerStarted; + - (void) runProgram: (NSString *)path inCurrentDirectory: (NSString *)directory withArguments: (NSArray *)array