Author Topic: Click to edit watch items?  (Read 15655 times)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Click to edit watch items?
« on: March 10, 2014, 08:04:40 pm »
Is there a reason not to just be able to click on a watch item and have it become editable? (i.e. why do i need to right click -> "rename"?)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Click to edit watch items?
« Reply #1 on: March 10, 2014, 10:18:20 pm »
wxPropertyGrid doesn't allow us to do it. You can hit Insert to edit the selected watch.
Double clicking is meant for expand/collapse.
(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 dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Click to edit watch items?
« Reply #2 on: March 10, 2014, 11:12:02 pm »
Yeah a quick look at the docs seems to confirm. Insert not very discoverable but good enough now that I know.

Btw, is it intended that hitting del on "Locals" removes the special locals (and its children)?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Click to edit watch items?
« Reply #3 on: March 10, 2014, 11:34:07 pm »
I'd rather use f2, but it is not possible, because it is used for something else and wx doesn't allow local accelerators. :(

Btw, is it intended that hitting del on "Locals" removes the special locals (and its children)?
No, exact steps to reproduce please.
(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 dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Click to edit watch items?
« Reply #4 on: March 11, 2014, 03:54:04 pm »
Btw, is it intended that hitting del on "Locals" removes the special locals (and its children)?
No, exact steps to reproduce please.
[/quote]

Start debugger, and hit a break point. Click on "locals", click it again so that it receives focus, press del key. Can do the same for function args.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Click to edit watch items?
« Reply #5 on: March 11, 2014, 08:06:25 pm »
Bleh, this shouldn't have been possible  :-\
(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 dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Click to edit watch items?
« Reply #6 on: March 11, 2014, 08:43:41 pm »
I like the locals feature though. I just implemented it for my python debugger.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Click to edit watch items?
« Reply #7 on: March 11, 2014, 09:26:41 pm »
Fixed in trunk.

For gdb's debugger locals/func args are almost unusable for real world projects (debugging c::b for example).
(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 dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Click to edit watch items?
« Reply #8 on: March 11, 2014, 09:35:53 pm »
Because of speed? I noticed the C::B takes a long time to update the watch between steps, but wasn't sure that was the reason.

Performance is pretty good for python, but I only enumerate and update the children of items (including the locals item itself) if the item is expanded and I truncate long strings of data on the python end to minimize whatever bottleneck occurs when transferring long strings back to C::B. I also had to recategorize locals into functions, classes, modules, and other because everything is an object in python.
« Last Edit: March 11, 2014, 09:40:54 pm by dmoore »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Click to edit watch items?
« Reply #9 on: March 11, 2014, 10:09:39 pm »
Because of speed? I noticed the C::B takes a long time to update the watch between steps, but wasn't sure that was the reason.
Yes, the PipedProcess class is very slow when there are tons of lines. This is the major bottleneck.

I also had to recategorize locals into functions, classes, modules, and other because everything is an object in python.
Can you show a screen shot, by the description it sounds that it is too cluttered, but it might not be the case.
I suppose I should try your debugger. Where are the most recent sources?
(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 dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Click to edit watch items?
« Reply #10 on: March 12, 2014, 12:19:06 am »
Github... (see my sig)

To compile, use the all target if building against self compiled C::B, otherwise use the cbplugin target to build agaibst system installed.

To use, just open a python script and start debugging (no project target support yet)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Click to edit watch items?
« Reply #11 on: March 12, 2014, 12:36:14 am »
I'd rather implement some autotools support for it, because this is how I build my plugins I use with C::B.
If you're interested you can look how I've done the gdbmi plugin, it is pretty simple and straight forward (for autotools)

Do you support attaching to running applications?
(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 dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Click to edit watch items?
« Reply #12 on: March 12, 2014, 12:53:02 am »
Re attach to process, not yet. rpdb supports this but it's a bit of work.

I doubt I will have time to set up the autotools stuff any time soon. Would be nice if we had a script that could generate the files from a plugin's cbp.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Click to edit watch items?
« Reply #13 on: March 15, 2014, 02:56:26 pm »
I'd rather implement some autotools support for it, because this is how I build my plugins I use with C::B.
If you're interested you can look how I've done the gdbmi plugin, it is pretty simple and straight forward (for autotools)

Have you looked at cmake? Among its many nice tricks is its ability to generate Code::Blocks project files. (Would like to see more C::B integration with cmake, but unfortunately I don't have the time any time soon)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Click to edit watch items?
« Reply #14 on: March 16, 2014, 02:53:21 pm »
Have you looked at cmake?
No, but we might start using it at my company, so I'll probably have, too.

Among its many nice tricks is its ability to generate Code::Blocks project files.
Last time I've tried it, it just generated makefile based projects, not proper projects.
(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!]