Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Launch application in separate terminal
Launch application in separate terminal [message #201924] Wed, 19 September 2007 18:13 Go to next message
Eclipse UserFriend
Originally posted by: gruscoe.sigmavisions.com

Sorry for posting this twice but some how I posted it to some other
thread!!!

Hi, I'm using Eclipse and CDT to build a console application. The
project has many files, directories, and executables. I need to be able
to debug the startup of these executables. The executables are console
applications that use a character based widget set. They need to run in
an external terminal. Currently they work very well in gnome-terminal.

I am trying to figure out how to launch the application from within
Eclipse in debug mode so we can debug the startup of the programs. In
order for this to work Eclipse needs to launch an external Terminal
window or the application fails to run (complains about the "dumb"
terminal among other things ... plus the widget set is not likely to run
inside Eclipse's console).

Currently we have to run it from the console and attach to a running
process. While this is not convenient we do have it working. However,
when it comes to debugging the startup of the application we can't do
this unless we can start the app from within Eclipse and have Eclipse
launch it in a separate (configurable?) terminal.

We are using Europa Eclipse 3.3 (cdt 4).

I cannot find any place to tell it to use an external console.

Thank you in advance.

-Geoff
Re: Launch application in separate terminal [message #201957 is a reply to message #201924] Thu, 20 September 2007 11:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ronbermejo.yahoo.com

Geoff wrote:


> Sorry for posting this twice but some how I posted it to some other
> thread!!!

> Hi, I'm using Eclipse and CDT to build a console application. The
> project has many files, directories, and executables. I need to be able
> to debug the startup of these executables. The executables are console
> applications that use a character based widget set. They need to run in
> an external terminal. Currently they work very well in gnome-terminal.

> I am trying to figure out how to launch the application from within
> Eclipse in debug mode so we can debug the startup of the programs. In
> order for this to work Eclipse needs to launch an external Terminal
> window or the application fails to run (complains about the "dumb"
> terminal among other things ... plus the widget set is not likely to run
> inside Eclipse's console).

> Currently we have to run it from the console and attach to a running
> process. While this is not convenient we do have it working. However,
> when it comes to debugging the startup of the application we can't do
> this unless we can start the app from within Eclipse and have Eclipse
> launch it in a separate (configurable?) terminal.
> We are using Europa Eclipse 3.3 (cdt 4).
> I cannot find any place to tell it to use an external console.
> Thank you in advance.
> -Geoff

Hello!

AFAIK the eclipse launch/debug console isn't a true "terminal" and is just
sort of like a document view built up from sniffing the process' stdout. I
guess you can just create an 'External Tools' launch configuration to
launch a terminal with your desired application. Then, IF you can edit the
application's main() function, you could add a sleep() call at the very
beginning to give you time to launch a debug configuration based on 'C/C++
Attach to Local Application', and attach it to your process.

Hope this helps!
Ron
Re: Launch application in separate terminal [message #201965 is a reply to message #201957] Thu, 20 September 2007 13:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gruscoe.sigmavisions.com

>
> AFAIK the eclipse launch/debug console isn't a true "terminal" and is
> just sort of like a document view built up from sniffing the process'
> stdout. I guess you can just create an 'External Tools' launch
> configuration to launch a terminal with your desired application. Then,
> IF you can edit the application's main() function, you could add a
> sleep() call at the very beginning to give you time to launch a debug
> configuration based on 'C/C++ Attach to Local Application', and attach
> it to your process.
>
> Hope this helps!
> Ron
>

I really appreciate the idea. While I wouldn't mind doing this I have
to make a recommendation for the department. Currently they are looking
at Netbeans 6.0beta1 as well, which offers a launch in terminal of your
choice. It seems to work very nicely and I'm afraid that's going to
decide the vote.

The only two downsides to the Eclipse CDT (for the department) are the
debugging of an app that requires are terminal and the problem I raised
a while ago that causes CDT not to recognize stl elements when the
"using namespace std" is in the header files.

Unfortunately with the code the team is using these are going to be
pretty big selling points for the Netbeans side. I hope Eclipse can
make a come back! I wish I had time to pitch in to get these features
done in time... Maybe in the future I can.

If anyone has any feedback on this, please let me know.

Thanks,
Geoff
Re: Launch application in separate terminal [message #202336 is a reply to message #201924] Fri, 28 September 2007 14:16 Go to previous message
Eclipse UserFriend
Originally posted by: gruscoe.sigmavisions.com

>
> I cannot find any place to tell it to use an external console.
>
> Thank you in advance.
>
> -Geoff

I was really hoping I had just missed how to do this. Without this
feature console applications cannot be started and debugged effectively.

I believe this should be a fairly high priority feature / enhancement.

If nobody objects (or has a better idea), I think I should submit a bug
for this enhancement. Maybe it can make it into 4.0.2? Who knows maybe
I'll be able to help out on it.

Thanks,
Geoff
Previous Topic:API for retrieving defined symbols
Next Topic:moved CDT project to Vista - path issue causing build error
Goto Forum:
  


Current Time: Thu May 01 14:11:20 EDT 2025

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

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

Back to the top