Author Topic: Splitting debugger in two - specific debugger and common GUI  (Read 429076 times)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #495 on: August 12, 2011, 09:39:49 am »
Another thing to put onto your todo-list (if it is possible):
make the font of the tooltip configurable, at least the size.
It's very small on my 1920x1200 17" laptop.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #496 on: August 12, 2011, 10:02:54 am »
Yes, this is in the TO-DO inside my head:)
My idea is to have it as an offset from the default font.
Is this OK or would you prefer a fixed setting?
« Last Edit: August 12, 2011, 11:04:22 am by oBFusCATed »
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #497 on: August 12, 2011, 03:03:37 pm »
Is this OK or would you prefer a fixed setting?
If you ask such a question, the answer is clear:
Make it configurable, but initialised with an offset from the default font... ;-) :lol:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #498 on: August 12, 2011, 03:23:57 pm »
No, I won't add two settings! There are plenty of options in the config dialogs already.
My desire is to trim the number of options no increasing it.
Adding an option is the easiest way for the developer, but not for the user:)

It would be an offset from the default font OR a number specifying the size of the font.
(I could add some mumbo-jumbo to calculate the default with an offset, but I'm not sure I like the idea)

My preference is an offset, because if the user changes his/her default font - the tooltips will change automagically.
(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #499 on: August 12, 2011, 03:42:32 pm »
I would prefer it fully configurable with a reasonable default value (e.g. same font as editor, with a smaller size).

It's just one button, to chose the font and all parameters like in the ditor settings, that should not be too much for the users.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #500 on: August 12, 2011, 03:46:54 pm »
I use the default font at the moment. The font in the editor has other requirements (monospace-ness).

OK, I would implement the same GUI as the editor's font settings.
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #501 on: August 12, 2011, 04:29:32 pm »
Patch v2(still against rev 7366), though I have done every thing to emulate a cb event, it seems I still failed to show the debugger's tip when ctrl pressed. hope some one can help, thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #502 on: August 12, 2011, 05:38:15 pm »
Hi Guys! Long time no post.

No, I won't add two settings! There are plenty of options in the config dialogs already.

Off Topic: Agree that its cluttered, but that's a reflection of a bad UI for settings, not too many settings. I think we need some mechanism for changing advanced settings that doesn't involve hand editing xml, such as a searchable property sheet, so that we can give new users simpler settings dialogs and advanced users more flexibility.

On Topic: I should probably just read the thread/code, but do you have a cliff notes version of the status of your work on the debugger API, oBFus? (May have some free time to think about the python debugger again in coming months)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #503 on: August 12, 2011, 05:55:06 pm »
dmoore: Probably you're right that something like "about:config" will be very handy.... :)

Regarding the API, I plan to replace all the raw pointers with cb::shared_ptr (where applicable of course) and then I'll focus on the gdb_mi plugin for a while...
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #504 on: August 13, 2011, 05:07:47 pm »
Patch v2(still against rev 7366), though I have done every thing to emulate a cb event, it seems I still failed to show the debugger's tip when ctrl pressed. hope some one can help, thanks.
Ok, I solved the problems in v2 patch, and now when I hit the ctrl key, the debugger will show the tip now. (test only under WinXP). the reason v2 failed is that I forget setting the editor pointer in the emulated c::b event.

see the v3 patch (which is against debugger_branch rev 7376), note I have some DebugLog function in the patch, you can safely remove them. I admit that the emulated way is not quite good, it looks like a hack. :D

comments are welcome!
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #506 on: August 14, 2011, 04:39:42 am »
Here is my take at the problem: http://smrt.is-a-geek.org/codeblocks/patches/dbg/dbg_refactor0022.5.patch
Your patch is better than mine! I test it under WinXP, and it works OK.

Also, thegdb 7.3 problem  question about exit the debugee when debugging is also solved. thank you!
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #507 on: August 14, 2011, 10:37:48 am »
/topic,15074.msg100825.html#msg100825]question about exit the debugee when debugging[/url] is also solved. thank you!
Guys, can you explain shortly why for both of you there are modifications in the wxScintilla component required? This doesn't sound obvious and honestly should be avoided as this would surely introduce side-effects.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #508 on: August 14, 2011, 10:55:50 am »
/topic,15074.msg100825.html#msg100825]question about exit the debugee when debugging[/url] is also solved. thank you!
Guys, can you explain shortly why for both of you there are modifications in the wxScintilla component required? This doesn't sound obvious and honestly should be avoided as this would surely introduce side-effects.
1,
gdb 7.3 exit issue is solved in rev Revision: 7378
Quote
Author: tpetrov
Date: 2011-8-14 8:19:54
Message:
* debugger_branch: fix program exit detection, when using gdb 7.3;

-------------------------------
M : /branches/wxpropgrid_debugger/src/plugins/debuggergdb/gdb_driver.cpp  

2, modify the scintilla code is is try to add a feature that when debugging, hold on the CTRL key, then the mouse hover on a variable will show the debugger tip value.




If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #509 on: August 14, 2011, 11:08:52 am »
2, modify the scintilla code is is try to add a feature that when debugging, hold on the CTRL key, then the mouse hover on a variable will show the debugger tip value.
This I understood, but why can't this be done without modifying the wxScintilla component?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ