newbie question about eclipse perspective...

  • Thread starter =?ISO-8859-1?Q?Martin_J=F8rgensen?=
  • Start date
?

=?ISO-8859-1?Q?Martin_J=F8rgensen?=

Hi,

I just downloaded eclipse with the CDT (c/c++ extension) and now I can
compile programs using makefiles. That's great...

But when I debug I guess it calls the gdb-debugger and when it returns
it keeps bringing me a dialog box which says: "Confirm Perspective
Switch" in the heading and "! This kind of launch is configured to open
the C/C++ perspective when it suspends. Do you want to open this
perspective now?"

Ofcourse I could just answer "no" and "remember this setting", but where
is this set up in the program?


Best regards / Med venlig hilsen
Martin Jørgensen
 
O

Oliver Wong

Martin Jørgensen said:
Hi,

I just downloaded eclipse with the CDT (c/c++ extension) and now I can
compile programs using makefiles. That's great...

But when I debug I guess it calls the gdb-debugger and when it returns it
keeps bringing me a dialog box which says: "Confirm Perspective Switch" in
the heading and "! This kind of launch is configured to open the C/C++
perspective when it suspends. Do you want to open this perspective now?"

Ofcourse I could just answer "no" and "remember this setting", but where
is this set up in the program?

Probably somewhere in Windows->Preferences. I don't have the CDT plugin,
so I can't give you an exact location, but when you open
Windows->Preference, you'll see a textbox with the contents "type filter
text". Type in something there like "CDT" or "C/C++" and you'll only see the
preferences related to CDT, which will narrow down your search.

- Oliver
 
?

=?ISO-8859-1?Q?Martin_J=F8rgensen?=

Oliver said:
Probably somewhere in Windows->Preferences. I don't have the CDT
plugin, so I can't give you an exact location, but when you open
Windows->Preference, you'll see a textbox with the contents "type filter
text". Type in something there like "CDT" or "C/C++" and you'll only see
the preferences related to CDT, which will narrow down your search.

Thanks a lot for the hint...

I found it, but I still have a problem. Perhaps you can see it too under
Windows -> Preferences -> Run/Debug -> Option 3 or 4 from the top. It
says: "Activate the debug view when a breakpoint is hit". I have that
box marked... Below it says: "Open the associated perspective when an
application suspends". And here it is (I found out by experimenting)...
I had it on "prompt" before. If I put it on never, it doesn't asks me again.

But actually I would like to have it on "Always" if I could just change
the associated perspective to "Debug"... I even tried to do that under
General -> Perspectives -> "Debug" is now default... But it still
doesn't work. Somehow C/C++ is associated.

I tried to close all perspectives and start them again... Yet I get:
"!This kind of launch is configured to open the C/C++ perspective when
it suspends. Do you want to open this perspective now?"

Anyone knows how to do it - make "Debug" the associated perspective?



Best regards / Med venlig hilsen
Martin Jørgensen
 
O

Oliver Wong

Martin Jørgensen said:
Thanks a lot for the hint...

I found it, but I still have a problem. Perhaps you can see it too under
Windows -> Preferences -> Run/Debug -> Option 3 or 4 from the top. It
says: "Activate the debug view when a breakpoint is hit". I have that box
marked... Below it says: "Open the associated perspective when an
application suspends". And here it is (I found out by experimenting)... I
had it on "prompt" before. If I put it on never, it doesn't asks me again.

But actually I would like to have it on "Always" if I could just change
the associated perspective to "Debug"... I even tried to do that under
General -> Perspectives -> "Debug" is now default... But it still doesn't
work. Somehow C/C++ is associated.

I tried to close all perspectives and start them again... Yet I get:
"!This kind of launch is configured to open the C/C++ perspective when it
suspends. Do you want to open this perspective now?"

Anyone knows how to do it - make "Debug" the associated perspective?

I suspect you cannot do that. Your best bet would be to write to the
developers of CDT asking for them to add in this option. Get an account on
Eclipse's newsserver (see http://www.eclipse.org/newsgroups/), then post to
eclipse.tools.cdt.

- Oliver
 
D

ducnbyu

Are you able to manually switch the perspective to debug with
Window/Open Perspective/Other.../Debug?
 
I

IchBin

Are you able to manually switch the perspective to debug with
Window/Open Perspective/Other.../Debug?

If you want to debug perspective then right click on your program and
the select "Debug as..." The Debug perspective automatically opens. It
should stay opened and you just have to click on the perspective tab or
what other perspective you have open at the same time in the Tabs to
move back and forth.

--

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 
O

Oliver Wong

IchBin said:
If you want to debug perspective then right click on your program and the
select "Debug as..." The Debug perspective automatically opens. It should
stay opened and you just have to click on the perspective tab or what
other perspective you have open at the same time in the Tabs to move back
and forth.

The debug perspective will only open when you select "Debug As..." if
you said "Yes" to the first time when Eclipse asked "Do you always want to
switch to the debug perspective when debugging?" and checked the "Never ask
me again" box.

If you said "No", then the way to access the debugging perspective is to
use the menu "Window->Open Perspective->Other..." then in the list, select
the Debug perspective.

- Oliver
 
?

=?ISO-8859-1?Q?Martin_J=F8rgensen?=

Are you able to manually switch the perspective to debug with
Window/Open Perspective/Other.../Debug?

Yes.


Best regards / Med venlig hilsen
Martin Jørgensen
 
?

=?ISO-8859-1?Q?Martin_J=F8rgensen?=

What exactly do you mean by "right-clicking the program"? I can't
right-click and select debug as anywhere, I think.

It stays open and doesn't bug me if I disabled the "suspend prompt".
This "suspend prompt" is apparently enabled by default. But my problem
isn't big - I can just disable it.
The debug perspective will only open when you select "Debug As..." if
you said "Yes" to the first time when Eclipse asked "Do you always want
to switch to the debug perspective when debugging?" and checked the
"Never ask me again" box.

I can't remember if it asked this.
If you said "No", then the way to access the debugging perspective is
to use the menu "Window->Open Perspective->Other..." then in the list,
select the Debug perspective.

I usually just click on the "Debug"-perspective in the top right corner
next to where the C/C++-icon is, but that should be the same - at least
the result is.


Best regards / Med venlig hilsen
Martin Jørgensen
 
?

=?ISO-8859-1?Q?Martin_J=F8rgensen?=

Oliver Wong wrote:
-snip-

Oh yes, another thing: I can't see any variables in the "Variables"
view... And the "Registers" view is empty too... Normally in other
debuggers I've seen that the variables that are current in scope is
displayed in the "Variables" view... But perhaps I'm doing something wrong?


Best regards / Med venlig hilsen
Martin Jørgensen
 
O

Oliver Wong

Martin Jørgensen said:
Oliver Wong wrote:
-snip-

Oh yes, another thing: I can't see any variables in the "Variables"
view... And the "Registers" view is empty too... Normally in other
debuggers I've seen that the variables that are current in scope is
displayed in the "Variables" view... But perhaps I'm doing something
wrong?

Are you actually debugging a program? Is the programmed in a paused
state?

- Oliver
 
O

Oliver Wong

Oliver Wong said:
Are you actually debugging a program? Is the programmed in a paused
state?

I just remembered you're working with C++ and not Java. Perhaps the CDT
doesn't use the debugging perspective to do its debugging. Recall how, when
you tried to do some debugging, it tried to convince you to switch to some
other perspective. Have you tried going to that perspective that it
suggested, and seeing if the debugging information shows up there?

Alternatively, just go to the Eclipse CDT newsgroup and ask them about
it.

- Oliver
 
?

=?ISO-8859-1?Q?Martin_J=F8rgensen?=

Oliver said:
Are you actually debugging a program? Is the programmed in a paused
state?

Yes it works fine (the program is suspended after each execution line),
but I don't see the values of the variables.


Best regards / Med venlig hilsen
Martin Jørgensen
 
?

=?ISO-8859-1?Q?Martin_J=F8rgensen?=

Oliver Wong wrote:
-snip-
I just remembered you're working with C++ and not Java. Perhaps the
CDT doesn't use the debugging perspective to do its debugging. Recall
how, when you tried to do some debugging, it tried to convince you to
switch to some other perspective. Have you tried going to that
perspective that it suggested, and seeing if the debugging information
shows up there?

Yep. Nothing.
Alternatively, just go to the Eclipse CDT newsgroup and ask them
about it.

Huh? I'll do that. But I don't think I have it on my news-server because
if I search for eclipse I only get some astronautic cosmic group. I also
tried to search on google groups for "eclipse cdt plugin" but didn't
really find anything useful.

What's the name of the eclipse newsgroup? I hope I can access it on
google, although I've never tried writing with google groups.


Best regards / Med venlig hilsen
Martin Jørgensen
 
I

IchBin

Martin said:
Oliver Wong wrote:
-snip-


Yep. Nothing.


Huh? I'll do that. But I don't think I have it on my news-server because
if I search for eclipse I only get some astronautic cosmic group. I also
tried to search on google groups for "eclipse cdt plugin" but didn't
really find anything useful.

What's the name of the eclipse newsgroup? I hope I can access it on
google, although I've never tried writing with google groups.


Best regards / Med venlig hilsen
Martin Jørgensen

http://www.eclipse.org/newsgroups


Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 
I

IchBin

IchBin said:

or their news server = news.eclipse.org
group = eclipse.tools.cdt

go to www.eclipse.org/newsgroups (Upper right hand conner) and request a
free account so you can login to their news server to submit questions.

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 
?

=?ISO-8859-1?Q?Martin_J=F8rgensen?=

IchBin wrote:
-snip-
or their news server = news.eclipse.org
group = eclipse.tools.cdt

go to www.eclipse.org/newsgroups (Upper right hand conner) and request a
free account so you can login to their news server to submit questions.

Thanks, I'll try that.


Best regards / Med venlig hilsen
Martin Jørgensen
 
D

Dale King

The issue there is more likely how your program is compiled. You have to
make sure that the binary actually contains debugging information and
the information is of the correct type. For GNU compilers you have to
add the -ggdb3 flag to the compile and link.

You don't usually want this debug information in the version you ship so
you either need to have a different profile that doesn't generate this
information. You can also run a strip program to strip the information,
but you usually want to change optimization as well between debugging
and the shipping version. If you are running the program remotely and
connecting with GDB on the target then you can run your program with the
symbols stripped on the target, but use the one with symbols on the
machine running gdb.

Another issue affecting debugging is the finding of source files on
Windows machines when using a non-windows compiler. If the compiler you
are using is something like cygwin then the information in the file will
contain cygwin style paths (/cygdrive/c/mypath/myfile.c). But Eclipse
uses windows paths. It can handle forward slashes instead of
backslashes, but will no nothing about /cygdrive/c. So Eclipse supports
path mappings which allow you to say things like /cygdrive/c really maps
to C:.
I just remembered you're working with C++ and not Java. Perhaps the
CDT doesn't use the debugging perspective to do its debugging.

The CDT does use the debug perspective. It adds a few views to it
specific for C, such as a memory view, disassembly, and registers but is
the same old debug perspective.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top