Author Topic: Debugger doesn't show certain things  (Read 219 times)

Offline 51423benam

  • Single posting newcomer
  • *
  • Posts: 4
Debugger doesn't show certain things
« on: July 30, 2018, 06:36:27 pm »
Hello,

the codeblocks debugger (gdb) doesn't show me things I want to watch. For example in the watch windows I would want to exand "this" like I can do in VS (so that I can view member vars easily. Also, I can not watch contents of standard datatypes well, for example of std::vector in VS I can just see all Datafields of it. And these are not the only thing. The watch windows is nearly useless for me. Is that the problem of gdb of of codeblocks?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10967
    • Travis build status
Re: Debugger doesn't show certain things
« Reply #1 on: July 30, 2018, 07:10:44 pm »
For this -> right click and select dereference this
For vector: install and setup python pretty-printer enabled gdb.

C::B's integration of the debugger is miles away from the one VS. On windows it is more troublesome than on linux.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline 51423benam

  • Single posting newcomer
  • *
  • Posts: 4
Re: Debugger doesn't show certain things
« Reply #2 on: July 30, 2018, 09:15:09 pm »
Thanls for the reply. Where do I have to click on this? It doesn't work in the watches, so do I have to do that in the code? That would mean that I would have a 'this' in every class object I want to examine.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10967
    • Travis build status
Re: Debugger doesn't show certain things
« Reply #3 on: July 30, 2018, 11:02:47 pm »
You have to add 'this' in the watches window and do the right click operation or just add *this in the watches.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1919
Re: Debugger doesn't show certain things
« Reply #4 on: July 31, 2018, 11:40:50 am »
Here are some links that describe the activation of pretty printers:
http://wiki.codeblocks.org/index.php/Pretty_Printers
https://code.google.com/archive/p/qp-gcc/wikis/GDB.wiki
http://forums.codeblocks.org/index.php/topic,21998.msg149737.html#msg149737

we should integrate this better in the debugger plugin... But there are TONS of things to do....
If you have some trouble for one specific thing, please ask specific questions.... General questions are hard to answer and don't lead to a target....

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1919
Re: Debugger doesn't show certain things
« Reply #5 on: July 31, 2018, 11:52:55 am »
Also if you try the steps it would be great if you could give some feedback, so that i can create a proper tutorial for this...