-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
White terminal background #174
Comments
IMHO it's way more common for people to use terminals with dark background, for this reason the defaults reflect that. But of course you customize the colors (and pretty much everything else...). Please take a look at this wiki page. |
Sure, I was not proposing to change the default but making it easier for those who don't use a dark theme. I don't know of any scientific surveys but quickly found this poll with over 2500 participants where a significant number of people (>10%) stated that they are using a light background. It might be a minority in relative terms but enough people to warrant an easy option for them IMHO: suppose that the 10% of the poll are also true for the 6k people that starred this project on github then about 600 people would have to fiddle with the colors to get it to work properly in their setups. If I understand you correctly you would rather not change the code. Would adding a gdbinit script to the repo that sets up custom colors be more to your liking? |
I could add a section to the wiki with something like "themes" so that people con contribute. Unfortunately though, I use the wiki to host assets too, so I will not allow public modifications; still people can interact via issues. If you come up with a configuration script for white background terminal I'd be happy to add it to the wiki and crediting you as the author (if you want). Alternatively you/others can host their theme in a Gist or a separate repo and I can simply add a link to it. In this way authors would be able to maintain their code autonomously, which is better. What do you think? |
I think an entry in the wiki with the themes directly would be completely fine for now. If there are really lots of submissions you can re-evaluate later. :) Here is what I was able to come up with so far (no need to credit me but you can if you like):
The use of reversed colors for Another thing that might warrant another bug report/feature request: it would be great if panes could have a constant/minimum height. The flickering due to #59 is already very annoying but there is at least a workaround by using multiple terminals (I'd very much would like to avoid that but it's another story). For example the source pane is shrunk to a single line when an error message is printed (which is rather common in most of my use cases but just an example anyway). I'd rather see lots of empty space than jumping panes. |
Ah, and one other thing: I often use remote debugging. This usually works by having some kind of proxy (gdb server) running near the target and transferring control and status information via a serial protocol (often tunneled through TCP). This has the disadvantage that there is quite some delay between entering a command and getting all the required data back from the device (especially if lots of stuff is read from the device as with gdb-dashboard). This causes perceived screen update times in excess of one second (if lots of code is executed in single-step mode it could be much longer). It would be great if the screen is only updated after all data is received and the old screen is preserved (maybe with an activity/busy marker). Is anything like that remotely possible? :) |
Thank you, let me think the best way to integrate this in the wiki. If (as I suspect) this will be the one and the only submission then the whole theme thing could not be ideal.
It is! :)
It is probably something that used to have sense but it is unused now. I need to clean up that part.
I see your point, but there is no ultimate solution. Making some modules always fixed in height could be an option. But while it would work fine for Source and Assembly modules it wouldn't for, say, Stack and Threads. So instead of implementing something half good I'd rather wait to have a better idea...
It would be great indeed! But AFAIK it's simply impossible. The reason is that when the program is stopped and one step ( Displaying the dashboard in a separate terminal does not have this problem though; why it's not an option for you? |
Yeah, I tried to reuse the most appropriate style without introducing something new. It's a (maybe) temporary decision, I wanted to wait for the things to settle (new modules, new features...). |
In general the reversing is very effective to highlight important values.
Oh, OK. Documenting this like I had to do in my comments to make sense of it, would probably be a good idea (e.g., on the style customization page). That sometimes leads to new insights on how to refine the actual code too.
For the stack it would be possible to only show the last n levels of the trace (and this would actually be favorable to seeing the whole trace IMHO). I don't see threads as a big deal here either... the number of threads in debugging shouldnt vary that much that one could not specify the maximum number for the height beforehand. And that's only an issue if the threads pane is used at all. So IMHO there is clearly a direct benefit in implementing it right away even if it does not solve all the problems of jumpiness.
I have played only a bit with the
The beauty of dashboard is that it integrates so elegantly into all installed GDB instances (I regularly use various GDBs for at least 3 different CPU architectures/cross-GCCs). Often they are started as part of makefile goals. Fiddling with shell aliases or launch scripts to easily start the right gdb with the correct options with this multi-terminal setup ruins this experience. Also, having a single window is by itself a big usability advantage (we all have way too many terminals open already, don't we? :D) But for now it might suffice... I will look into it further. PS: On Friday when I was playing around with the logging and dashboard's -output option I also came up with a code fragment to derive the PTS for the current instance. Maybe this is useful to anybody so I just leave it here:
|
For the time being I simply added a wiki page about a better theme for white background terminals. I've changed a couple of things about your proposed theme to be more similar to the original in spirit and I tried to use only basic ANSI colors. I expect to add a few more themes myself so to justify a proper "theme page" in the future, in that case, I'd love you to host your polished original theme somewhere so I can link back to it and so you can keep it updated as you please. Thanks for all the suggestions.
I was wrong, it's used in the Memory module for example to separate the watched memory areas.
I need to thoroughly think about this, thanks for the hints.
I remember I've tried too and without luck. The logging feature sends all the output, including the dashboard to the log file (I guess it simply redirects
Quite frankly, I've lost my faith n the GDB dev team, see the implementation of |
Thanks you!
In the meantime I was implementing a workaround to use gdb-dashboard in my actual work flow. It creates and places a slave terminal window automatically when launching gdb and attaches the dashboard's
Hm, funny. Github destroyed the link to the gdb bug you sent originally: https://sourceware.org/bugzilla/show_bug.cgi?id=18385 |
Not everybody uses terminals with black backgrounds/dark themes. While gdb-dashboard can't support every possible color scheme out of the box it would be nice to have at least something for people using the quite commonly used black font on white background.
As far as I can tell (after looking at the code for about 60 seconds) I think the colors are set in the R class as ANSI color numbers. Since most of that class deals with styling properties I presume that creating another instance of that class and replacing the references to the R class in the remaining code with references to either an instance with the existing values or a user-provided (or supplied) white-background instance would be a viable way to implement customizations like this(?)
The text was updated successfully, but these errors were encountered: