User forums > General (but related to Code::Blocks)

Some suggestions for C::B improvements

(1/5) > >>

kevinxy:
Hello!

I'm an experienced C++ programmer, and I use C::B occasionaly. I'm currently working on some C++ tutorials for beginners(http://www.programming4beginners.com/), so I would like to present a few suggestions from that point of view.

1. Out of the box, there are are some problems with the debugger. The problem is in displaying elements of nested containers. 1D vecor is fine, but a 2D vector is not displayed correctly

- On Win7, SVN 10320 + gcc5.1 (TDM), gdb 7.9.1 + Python 2.7 :
It appears that debugger startup script - pretty printer is producing output in a format not recognized correctly by C::B. An older startup script for Python 2.7 from some previous version of TDMgcc is working

- If I remember correctly, the same issue happened with C::B 13.12 on Windows

- On Linux (Linux Mint 17.1), C::B 13.12,  gdb 7.9  seems to be linked to python 3. The pretty printer scrips is, again, using the new format which is not parsed correctly by code::blocks. The workaround is to edit the pretty printer script, and make it return the hint 'array' instead of 'vector', then it works correctly. It would also be good to have an option there to load pretty-printers without relying on .gdbinit, since a beginner is unlikely to have .gdbinit .

But, overall, the fix is to make C::B read this new output of pretty printers correctly

2. Since it's already 2015, it would be great if at least C++11 compiler option is enabled by default.

3. There is a bug that makes the 'watches' window forget the width of columns. It happens when this window is quite small. In that case, the third column gets very wide and the other two get extremely small. Happens on SVN 10320, but if I remember correctly, the same issue is with 13.12 and on Linux.

4. When entering 'debug' perspective it would be good to display call stack, debugger and watches windows by default. In the watches window, local variables are important for beginners.

Also, kudos for making 'run to cursor' start the debugger automatically, that one really makes it easier to work with debuggers.

And now some suggestions that I would like to have, for my own sake:
- the ability to choose background and text color of other windows (the white is killing me)
- the horizontal scrollbar in the editor window is usually unnecessary, and I would like to have an option to remove it. It's just wasting screen space, especially on a laptop.

I hope I didn't forget anything important, but anyways this looks like more than enough for the first post.

oBFusCATed:
1. Do you have the watch scripts enabled in the debugger's settings?
3. Try the patch posted here https://sourceforge.net/p/codeblocks/tickets/153/
4. Post a ticket for this on the sf.net page
5. C::B uses the global theme to blend with other apps, change the theme and you'll get darker C::B. We won't work on custom theme support.
 

kevinxy:
1. I have just tried removing my 'debugger initialization commands' and unchecking 'disable startup scripts'. As before, this does load the pretty printers, but C::B does not parse the output for 2D vectors correctly (1D vectors are fine)
3. I'll try and get back here with results.
4. Is this really for a ticket? It's more like a change request. But if you say so.
5. I would like the other apps to remain as they are. It's just when I'm programming that I need a darker background. I'm sad to hear that you don't plan to make this possible, I don't need a full theme, just a few colors changed.

But, of course, thank you for the answers!

oBFusCATed:
1. Using the python pretty printers that ship with libstdc++ this is unfixable in the current plugin, sorry.
4. Yes, adding it there minimizes the chance for it getting lost
5. Sorry you'll have to patch cb yourself to get this working...

l_inc:
kevinxy

--- Quote from: oBFusCATed on November 11, 2015, 01:15:55 am ---5. Sorry you'll have to patch cb yourself to get this working...

--- End quote ---
This one was bugging me as well, but I wasn't excited about patching C::B after each update. So my codeblocks.desktop has this line now:

--- Quote ---Exec=env GTK2_RC_FILES=/usr/share/themes/Yukitwo/gtk-2.0/gtkrc GTK_DATA_PREFIX="" codeblocks %F
--- End quote ---
Yukitwo is my modified Zukitwo with the following colors:

--- Quote ---gtk_color_scheme = "bg_color:#626262\nselected_bg_color:#6699CC\nbase_color:#707070" # Background, base. bg_color was d4d4d4, nselected_bg_color was 6699CC
gtk_color_scheme = "fg_color:#dcdccc\nselected_fg_color:#000000\ntext_color:#dcdccc" # Foreground, text.
gtk_color_scheme = "tooltip_bg_color:#000000\ntooltip_fg_color:#F5F5B5" # Tooltips.
gtk_color_scheme = "link_color:#94caff" # #08c Hyperlinks
gtk_color_scheme = "bg_color_dark:#707070\ntext_color_dark:#FFF" # Dark colors. bg_color_dark was 3f3f3f
--- End quote ---
Btw. I think following the global theme is a good default, but not giving a user an "override" checkbox to allow for custom color settings could be a showstopper for many newcomers.

Navigation

[0] Message Index

[#] Next page

Go to full version