Application opens with external console output when extending GDBCDIDebugger2 on Windows [message #1095118] |
Mon, 26 August 2013 12:49  |
Eclipse User |
|
|
|
Hello,
We have an extension point for org.eclipse.cdt.debug.core.CDebugger.
When the Debugger class extends GDBCDIDebugger2, only on Windows, the application opens up in a Windows console instead of a new built-in Eclipse console output.
If we choose to extend the AbstractGDBCDIDebugger instead, the application opens as expectedly in a new build-in Eclipse console.
I would like to ask if anyone has seen this behavior previously and has some pointers to what is causing it.
What are the benefits of extending GDBCDIDebugger2?
Thank you,
Catalin
|
|
|
Re: Application opens with external console output when extending GDBCDIDebugger2 on Windows [message #1095826 is a reply to message #1095118] |
Tue, 27 August 2013 11:31  |
Eclipse User |
|
|
|
Hello,
I found out that this is implemented to be the desired behavior in the GDBCDIDebugger2 class, with the mentioning that it doesn't work on Linux.
protected void startLocalGDBSession( ILaunchConfiguration config, Session session, IProgressMonitor monitor ) throws CoreException {
// TODO: need a better solution for new-console
MISession miSession = getMISession( session );
try {
CommandFactory factory = miSession.getCommandFactory();
MIGDBSetNewConsole newConsole = factory.createMIGDBSetNewConsole();
miSession.postCommand( newConsole );
MIInfo info = newConsole.getMIInfo();
if ( info == null ) {
throw new MIException( MIPlugin.getResourceString( "src.common.No_answer" ) ); //$NON-NLS-1$
}
}
catch( MIException e ) {
// We ignore this exception, for example
// on GNU/Linux the new-console is an error.
}
}
To disable this, override with an empty method and the application console will show within Eclipse.
Catalin
|
|
|
Powered by
FUDForum. Page generated in 0.04107 seconds