newbie question about eclipse perspective...

Discussion in 'Java' started by =?ISO-8859-1?Q?Martin_J=F8rgensen?=, May 10, 2006.

  1. 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

    --
    ---------------------------------------------------------------------------
    Home of Martin Jørgensen - http://www.martinjoergensen.dk
     
    =?ISO-8859-1?Q?Martin_J=F8rgensen?=, May 10, 2006
    #1
    1. Advertising

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

    Oliver Wong Guest

    "Martin Jørgensen" <> wrote in message
    news:...
    > 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
     
    Oliver Wong, May 10, 2006
    #2
    1. Advertising

  3. Oliver Wong wrote:
    >
    > "Martin Jørgensen" <> wrote in message
    > news:...
    >
    >> 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.


    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

    --
    ---------------------------------------------------------------------------
    Home of Martin Jørgensen - http://www.martinjoergensen.dk
     
    =?ISO-8859-1?Q?Martin_J=F8rgensen?=, May 10, 2006
    #3
  4. =?ISO-8859-1?Q?Martin_J=F8rgensen?=

    Oliver Wong Guest

    "Martin Jørgensen" <> wrote in message
    news:...
    > Oliver Wong wrote:
    >>
    >> "Martin Jørgensen" <> wrote in message
    >> news:...
    >>
    >>> 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.

    >
    > 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
     
    Oliver Wong, May 10, 2006
    #4
  5. =?ISO-8859-1?Q?Martin_J=F8rgensen?=

    Guest

    Are you able to manually switch the perspective to debug with
    Window/Open Perspective/Other.../Debug?
     
    , May 10, 2006
    #5
  6. =?ISO-8859-1?Q?Martin_J=F8rgensen?=

    IchBin Guest

    wrote:
    > 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-)
     
    IchBin, May 11, 2006
    #6
  7. =?ISO-8859-1?Q?Martin_J=F8rgensen?=

    Oliver Wong Guest

    "IchBin" <> wrote in message
    news:...
    > wrote:
    >> 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.


    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
     
    Oliver Wong, May 11, 2006
    #7
  8. wrote:
    > 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

    --
    ---------------------------------------------------------------------------
    Home of Martin Jørgensen - http://www.martinjoergensen.dk
     
    =?ISO-8859-1?Q?Martin_J=F8rgensen?=, May 11, 2006
    #8
  9. Oliver Wong wrote:
    >
    > "IchBin" <> wrote in message
    > news:...
    >
    >> wrote:
    >>
    >>> 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.


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

    >> 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.


    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

    --
    ---------------------------------------------------------------------------
    Home of Martin Jørgensen - http://www.martinjoergensen.dk
     
    =?ISO-8859-1?Q?Martin_J=F8rgensen?=, May 11, 2006
    #9
  10. 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

    --
    ---------------------------------------------------------------------------
    Home of Martin Jørgensen - http://www.martinjoergensen.dk
     
    =?ISO-8859-1?Q?Martin_J=F8rgensen?=, May 11, 2006
    #10
  11. =?ISO-8859-1?Q?Martin_J=F8rgensen?=

    Oliver Wong Guest

    "Martin Jørgensen" <> wrote in message
    news:...
    > 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
     
    Oliver Wong, May 11, 2006
    #11
  12. =?ISO-8859-1?Q?Martin_J=F8rgensen?=

    Oliver Wong Guest

    "Oliver Wong" <> wrote in message
    news:xJO8g.8759$Qq.1700@clgrps12...
    >
    > "Martin Jørgensen" <> wrote in message
    > news:...
    >> 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?


    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
     
    Oliver Wong, May 11, 2006
    #12
  13. Oliver Wong wrote:
    >
    > "Martin Jørgensen" <> wrote in message
    > news:...
    >
    >> 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?


    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

    --
    ---------------------------------------------------------------------------
    Home of Martin Jørgensen - http://www.martinjoergensen.dk
     
    =?ISO-8859-1?Q?Martin_J=F8rgensen?=, May 12, 2006
    #13
  14. 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

    --
    ---------------------------------------------------------------------------
    Home of Martin Jørgensen - http://www.martinjoergensen.dk
     
    =?ISO-8859-1?Q?Martin_J=F8rgensen?=, May 12, 2006
    #14
  15. =?ISO-8859-1?Q?Martin_J=F8rgensen?=

    IchBin Guest

    Martin Jørgensen wrote:
    > 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
    >


    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-)
     
    IchBin, May 12, 2006
    #15
  16. =?ISO-8859-1?Q?Martin_J=F8rgensen?=

    IchBin Guest

    IchBin wrote:
    > Martin Jørgensen wrote:
    >> 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
    >>

    >
    > http://www.eclipse.org/newsgroups


    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-)
     
    IchBin, May 12, 2006
    #16
  17. IchBin wrote:
    -snip-

    >> http://www.eclipse.org/newsgroups

    >
    >
    > 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

    --
    ---------------------------------------------------------------------------
    Home of Martin Jørgensen - http://www.martinjoergensen.dk
     
    =?ISO-8859-1?Q?Martin_J=F8rgensen?=, May 12, 2006
    #17
  18. =?ISO-8859-1?Q?Martin_J=F8rgensen?=

    Dale King Guest

    Oliver Wong wrote:
    >
    > "Oliver Wong" <> wrote in message
    > news:xJO8g.8759$Qq.1700@clgrps12...
    >>
    >> "Martin Jørgensen" <> wrote in message
    >> news:...
    >>> Oliver Wong wrote:
    >>>
    >>> 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?


    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.

    --
    Dale King
     
    Dale King, May 15, 2006
    #18
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jay Eckles
    Replies:
    1
    Views:
    1,673
  2. david wolf
    Replies:
    2
    Views:
    4,336
    samra
    Dec 10, 2012
  3. fiziwig
    Replies:
    34
    Views:
    1,206
    Chris Smith
    Jul 5, 2006
  4. Eeby
    Replies:
    0
    Views:
    416
  5. rajveer
    Replies:
    0
    Views:
    301
    rajveer
    Aug 22, 2008
Loading...

Share This Page