Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Debugger PlugIn Extension proposal (+Patch)

(1/2) > >>

MortenMacFly:
Dear devs,

it's me again. (Oh no! :lol:)
I've studied the latest changes and improvements concerning the debugger plugin. Great! In a recent post (http://forums.codeblocks.org/index.php/topic,1317.0.html) I have proposed a patch that allows a user to load a GDB script including commands that are being sent to the debugger line-by-line. With the recent changes I had another (for my purposes even better) idea that I've implemented:

I have extended the menu of the debugger tree with another option "Add watch script". This allows a user to load a file that contains watches on variables line-by-line. When is it useful? Imagine you have a program and use (e.g.) std::vector and want to watch specific or all element(s) of this vector. You would have to add each of them using "Add watch" which takes time. Furthermore the watches are lost after the restart of Code::Blocks. With my patch you can load the file and all watches listed there will be added automatically.

I would like to hear you comments on that.

Morten.

ToDo:
- Currently each watch is imported as WatchType "Unspecified" this should be changed so that the file contain another column with the type.
- Allow the user to save the list of (current) active watches to a file in the "Watch script" (XML?) format for easy re-loading
- With the current implementation sometimes the debugger tree gets weird. Maybe I am adding the watches too fast... ;-)
- (...)


[attachment deleted by admin]

mandrav:
Added in CVS :)

MortenMacFly:

--- Quote from: mandrav on November 19, 2005, 11:22:00 pm ---Added in CVS :)

--- End quote ---
Whohoo! That was fast. Thank you, I really appreciate that. Well, of course because the idea seems to be accepted I have further developd this feature. Now I added the functionality to save the watches that are currently active in the watch list. Find the patch attached (based on the CVS-HEAD of today). I would be glad, if you add this, too (if you like it).

Just a short note: I have renamed the ID/method "idAddWatchScript" to "idLoadWatchFile" and generally "WatchScript" to "WatchFile" (because it isn't really a script) for an obvious reason.

With best regards,

Morten.


[attachment deleted by admin]

mandrav:
Patched :)

MortenMacFly:

--- Quote from: mandrav on November 20, 2005, 06:51:17 pm ---Patched :)

--- End quote ---
Just in this very moment I've compiled the current CVS head - Very nice! :D

Thanks a lot.

Morten.

Navigation

[0] Message Index

[#] Next page

Go to full version