Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Application opens with external console output when extending GDBCDIDebugger2 on Windows(Application opens with external console output when extending GDBCDIDebugger2 on Windows)
Application opens with external console output when extending GDBCDIDebugger2 on Windows [message #1095118] Mon, 26 August 2013 16:49 Go to next message
Catalin Doras is currently offline Catalin DorasFriend
Messages: 7
Registered: July 2009
Junior Member
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 15:31 Go to previous message
Catalin Doras is currently offline Catalin DorasFriend
Messages: 7
Registered: July 2009
Junior Member
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
Previous Topic:Help with Window Management
Next Topic:Eclipse on ubuntu 12.04
Goto Forum:
  


Current Time: Wed Apr 24 19:34:34 GMT 2024

Powered by FUDForum. Page generated in 0.03394 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top