epasveer / seer

Seer - a gui frontend to gdb
GNU General Public License v3.0
2.09k stars 66 forks source link

UX suggestions for "Logger", problematic display of whitespace #168

Closed ell1e closed 10 months ago

ell1e commented 10 months ago

I'm having bigger trouble debugging some whitespace in strings because it's difficult from Seer's output to see what is actually contained in the string due to the display seeming rather unsuited for that. I think there would be multiple ways to improve this:

  1. There should be a way to copy the "Value" column of any row in the "Logger" view. I think the natural place to add this would be a context menu that has some "Copy Value to Clipboard" entry. This allows me looking at it in something that has the display preferences that I may for whatever reason need.

  2. The "Value" column of the "Logger"/"Tracker"/"Locals"/"Registers"/"Arguments"/"Watchpoints" views should maybe always be in monospace. It looks uglier but I can't think of any scenario where a non-monospace font has benefits beyond just possibly look slightly nicer, and there are plenty scenarios like differentiating zero 0 and big o O, counting number of spaces, and more where a non-monospace font becomes a huge hassle.

  3. (More unrealistic) If "GDB Output" was instead "GDB Console" showing GDB output but also letting me type, so I could just type "display X" there and copy it out from there. However, maybe this isn't feasible if it would interfere too much with Seer's GDB control or too complicated to add, ignore it in that case.

epasveer commented 10 months ago

For 1, it's already there using the ^C key. However, I must admit, it's not obvious.

Take this example:

image

When a row is selected, the column the cursor is in decides what text is copied to the clip board when the ^C key is used. So you can copy the "Timestamp" column or the "Value" column, but not both.

Also, it only copies the text to that last selected row. So if you select multiple rows, the text in the clip board is from the last row.

I like your idea of a context menu. I can do that. Two questions, though.

  1. Do you want just the "Value" column? Or all three? I suspect just "Value", but I'm just confirming.
  2. If multiple rows are selected, do you want the values to all selected rows in the clip board?

See PR #176

epasveer commented 10 months ago

For 2, makes total sense. I'll add that.

See PR #174

epasveer commented 10 months ago

For 3, I've thought about that since day 1.

Not sure if it's possible. There's no real Qt widget out there that can do a good job of being a console. I've though about it even for Seer's main console (where your program's output goes).

If I come across a good Qt console widget, I'll look into it again.

For now, that's why I added a text widget just for entering raw gdb commands (like your: "display X")

image

ell1e commented 10 months ago

It's really cool how active you are, that's amazing! I feel a little bad for proposing so many things, so don't feel bad if you don't get around to them or reject some.

Do you want just the "Value" column?

I don't know, I personally can't think of any use for the others. Maybe someone can think of a use case, though. I guess having the others possibly copied too wouldn't really matter to me either way, I just care about the value column myself. So if you have other users to ask, maybe they could provide some guidance here what is most useful.

@ text widget: I imagine that would be enough for most uses, honestly. Might be worth putting it inside the "GDB output" tab though rather than on top, simply to save UI space since I imagine many people won't need it that often given how good and comprehensive the UI already is.

edit: I forgot to answer this one:

If multiple rows are selected, do you want the values to all selected rows in the clip board?

Personally, I would only need this rarely for tricky whitespace situations. So I wouldn't need that functionality, but I can see others finding it useful. If it's easy to make that work then it sounds like an upgrade, but if not, I don't think it'll hurt much.

epasveer commented 10 months ago

I feel a little bad for proposing so many things

Please don't. This is my first opensource project. I wish more people we be more vocal :^) It only improves the final product...

epasveer commented 10 months ago

Points 1 and 2 are done and are in "main". I'm going to hold off on 3 until I find a better console widget.

I'm going to close this PR and it can be reopened it needed.