Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: oBFusCATed on June 09, 2009, 11:54:26 pm
-
Hello,
Here is a patch that adds an entry control in the debug log.
With this entry the user can send commands to the debugger easily.
This patch implements the basic functionality.
If the C::B devs think that the code is good and that is the proper way to add the entry,
further work can(will) be done (making it look like the script console).
Best regards
p.s. the patch is attached
-
You are so smart and this plugin works perfectly. :D
Thank you very much!
By the way: should be added to trunk. :shock:
-
little suggestion :
wxString cmd = m_pLog->GetCommandEntry().GetValue()
Would it not be better to hide the fact there's a wxTextCtrl, and something like :
m_pLog->GetCommand(),
That way we can always change the implementation of the DebugTextCtrlLogger, and there's one user less to worry about.
-
It could be done, but ClearCommandEntry() should also be added, because I clear the entry field on a command.
But do you think that the way/direction is right?
Edit:
Here is the patch modified to met the killerbot suggestion
-
Hi oBFusCATed,
I tested your modification and it has been really missing in CB for embedded development. The entry field is quite decent, so it is not so obvious for users. I would prefer:
1. A background color to distinguish the entry field from the rest of Debugger console or
2. Add a small Text like: Debugger Console Input:
I hope that your patch will be integrated soon in the trunk :-).
-
Here is another improvement of the patch: 8) :lol: :roll:
1. Replaced the wxTextCtrl with a wxComboBox (implemented history)
2. Added execute button
3. Made the debugger(debug) to look like the regular debugger pane
4. Added a text describing the purpose of the entry
I've encapsulated the thing in the new class DebugLogPanel.
I wanted to put all the code in DebugTextCtrlLogger, but I don't know how to use the Connect method on it.
Any comments are welcome.
Best regards...
-
Here is another improvement of the patch: 8) :lol: :roll:
It's getting better and better... :-)
-
Morten and others,
do you spot any problems that are stopping the patch from being applied to trunk?
Maybe an on/off option?
p.s. ctrl + v/c/x doesn't work, but I suppose this is a global problem
-
Time for me to test this out myself (seems like I am always a few days/weeks behind :( ).
Are there any other improvements, fixes of issues in the pipeline for this patch ??
-
I'm not using this feature, so I don't intent to spend more time on it.
Except for bug fixes, of course...
-
do you spot any problems that are stopping the patch from being applied to trunk?
The only thing I'd like to see is a cosmetic change: So that the script log looks the same as the debugger's log. This means:
1.) In the script log: Add a label in front of the textbox
2.) In the debugger's log add the buttons (and functionality) for "Load from file" and "Clear output window". Especially the first one would be just "cool". ;-)
-
OK, I'll take a look tonight.
But do you think that "Load from file" would be useful? Have you used the one in the script console?
-
But do you think that "Load from file" would be useful? Have you used the one in the script console?
Certainly. I have several scripts that clean up and prepare builds which I run from time to time. For the debugger I think it would be even more "nice" -> imagine initialisation commands or alike. However - I don't say you'll need to do that though. From my point of view the patch is nice just as it is. And it just works.
-
OK, Morten
I've added the clear button and load from file button.
I won't add the command static text in the script console because I'm not sure that I can edit the code without making damage (looks like it is generated by the wxSmith plugin)
The patch is sent to the patch tracker.
id: 002773
I've deleted all attachments with previous versions of the patch.
p.s. the load from file button executes "source filename" command, I don't know if it is appropriate, but it seems to work.
-
@oBFusCATed
Thanks, the new patch works well!
-
I've added the clear button and load from file button.
I didn't want to push you in that direction, but thanks!!!::-)
The patch is sent to the patch tracker.
id: 002773
I've taken that one.
-
I didn't want to push you in that direction, but thanks!!!::-)
I, as another dev in another project, like the symmetry, now we have some of it:)
You are left with the task to finish it by adding the label in the script_console :-P
-
Just wanted to say that I really appreciate your work. I'm looking forward to trying the patch with the next nightly (which will hopefully include it).
-
normally this weekend a new nightly will be made available.
-
id: 002773
Applied in trunk
I won't add the command static text in the script console because I'm not sure that I can edit the code without making damage (looks like it is generated by the wxSmith plugin)
Done in trunk. It's really easy, btw... That's what wxSmith is for. ;-)
-
Thanks for the application :)
I've tried to use it,
but it said that wxSmith is not setup to manage this project and I gave up.