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
Comments on the built-in debugger UI #1550
Comments
Ok, great. But it does show we'll have to properly document it. Apparently it isn't obvious.
We're using Dear ImGui as our GUI framework. At the moment it doesn't have good support for per-window shortcuts (but it's being worked on). Depending on how quickly that feature becomes available and how well it works, we'll either use that builtin feature, or we'll have to come up with something ourselves. It's also not the most urgent thing (as in: other things are more urgent) because there is a reasonable workaround.
Can you give more details on this item? Because when you place the new console (any window) fully inside the main openMSX window, then it does move along with the main window. And it is drawn partially transparent. (And you can size and place it similar as the old console). (By default) pressing F10 still opens/closes the new console the same as the old one. I'd love to hear in more detail which aspects make it less usable compared to the old console.
The "Dear ImGui" framework uses the "Immediate Mode GUI paradigm" (hence the name IM GUI). In this paradigm there is NO duplicated state between the application and the GUI. In this case that means there's NO copy/snapshot of the register values that's shown in the GUI. Instead the GUI just always shows the current values. This paradigm greatly simplifies the code, and reduces the possibility for bugs (no state that can get accidentally out-of-sync, no need for event-handlers or callbacks to sync the state, ...). And there's no performance overhead. Actually making a snapshot and keeping it up-to-date would introduce complexity and overhead. So if you want to stop register updates, you'll just have to pause the emulation (and then maybe fast-forward after unpausing). I believe that for the majority of the users/use-cases having real-time updated views is more useful than viewing snapshots (I mean while the emulation is also running). Especially for e.g. the bitmap/tile/sprite-viewer, but also for the register view (e.g. watch a delay-loop count down in real-time, or see at a glance how the SP varies during typical execution).
I admit I haven't actually tried for the floating openMSX windows. But in my desktop environment (KDE) I can make any window "always-on-top" (e.g. right click the window in the task bar, then select "always-on-top" (depending on the version it might be in a sub-menu). IceWM has similar functionality. And I guess most other window managers have similar functionality? That being said. There probably are still a few places where a sub-window is not (initially) placed on top of it's parent window. I recently fixed a bug like this, but I also need to audit the rest of the code.
I agree. But that's only possible with lots of user feedback. It already works pretty well for my personal use cases, but other people have different use cases. So thanks again for your comments. |
Hi, just a quick reply (don't have much time right now).
Did you maybe also miss that it already is transparent? Though only when the console is fully inside the main openMSX window (but that's also the case for the old console). Or do you mean that it's not transparent enough? The transparency is configurable. Though it's not immediately something we planned to expose. If you want to experiment with it anyway, you can try: Settings > Advanced > ImGui Demo Window (all the way at the bottom). There select Tools > Style Editor. Then select the "Colors" tab, then the 3rd entry "WindowBg", click the colored square, and in the color selector move the transparency slider down (=increase transparency). But again, we didn't plan to expose these very low level settings. Also the default ImGui transparency may be a little more opaque than the old openMSX console, but not too much I think (or it might depend on which background image you used in the old console?)
Those numbers are not really relevant, and it's anyway not representative for openMSX users. In any case, for openMSX development, we get more help from non-windows users. So thanks again for your feedback from a windows-user point of view. I did a quick google search, and apparently it's also easy to do in windows: via the Microsoft PowerToys utility, and the shortcut Windows+Ctrl+T. I agree it would be nice if this were configurable in openMSX itself. But since there is an easy workaround it's not high priority at the moment. |
Oh yeah... it seems it's transparent indeed but I didn't notice it because its way darker than the original one. So, if I understood correctly, the "ImGui Demo Window" is more than just a demo, and it can be used to adjust UI parameters actually? I totally missed that. Thank you!
It's perfect the way it is exposed currently. Just rename the settings to something else than "ImGui Demo" since that name is a bit misleading.
I'm actually more of a Mac user, but I frequently use OpenMSX on the laptop provided by the company I work for (and, sadly, they only allow Windoze computers). Anyway, trust me on this: Windows users are the majority.
Fair enough. It shouldn't be a definitive solution, but it's ok not to make it high priority at this moment. Again, thank you for your help. The better I know the new UI, the more I like it. |
Some other thoughts:
Thank you. |
Hi Colpocorto, All valid feedback. I'm only afraid that short-term there's not much we can do about this :( Here's some feedback on the individual points:
Ah, did you notice the new options "Settings > GUI > Save layout" and "Restore layout". At the moment these are still experimental. But it could be a partial solution or a workaround for the first two problems. Thanks for your feedback! Keep it coming. |
I understand this new UI is a big development and changing things will take time.
Not always the second monitor is available. It happened that last weekend I took the laptop with me and made a trip to a place where no monitors were available. Maybe, could it be somehow solved by adding a TCL command/script that moves all the floating windows to the centre of the active screen? Something like bring_all_windows_here. Or even better, it would be fantastic to have a tcl class to manipulate windows (something like UI::whatever) to cover this and other UI-related features in the future.
I've tried but it just set the focus on the off-screen window.
When using the classic debugger UI, I usually save the session with a descriptive name. Thus, I can read the decoration bar to know where I am. I haven't still found how to do this on the new UI.
While this option is not a solution for these issues, it is still a very nice feature that I'm sure I'll find quite useful in a near future. Thank you for your support. |
I noticed a small inconsistency in the file choosers: Symbol Manager -> Load symbol file -> ImGuiFileDialog needs one click to go into the next folder I guess this behavior is intended, because the first 2 options are for selecting files and the last option is for selecting folders (which is impossible if you go with one click into a folder)? I found it a bit confusing and unexpected. Maybe it would be a good idea to have double click to go to the next folder in all FileDialog modals. It is also the default behavior in most operating system. Would that be as simple as adding the flag |
Hi gilbertfrancois, Thanks a lot for your feedback! You're right and, at first, i also found this confusing. But the difference is indeed selecting a file versus selecting a directory. I agree it's unfortunate, but also not too bad (IMHO). And my preference is, at least for now, to not start making changes in 3rdpart code like ImGuiFileDialog (this would make upgrading to newer versions in the future much more difficult). But thanks for reporting. Keep the feedback coming. Wouter |
Assuming you are up to date, I think you can probably start looking at the |
This has now been solved, please take a look and comment on whether that's sufficient. (Indeed using |
Tested and working. F4 and F12 are shift-F7 and shift-F8 now (what it's fine). |
Thanks! For all different other issues, can you please re-evaluate and open separate issues for each one, if they still apply? |
I will during the weekend. I've also found some annoyances related to window docking. Will create separate ticktets soon. |
Just one more thing about the key bindings. I miss F9 to continue execution. Can it be added? EDIT: it seems that it is F5 now instead of F9. Bad choice. F5 to run is Microsoft-style while F7/F8 to step in/over is classic Borland binding (the one used on OpenMSX debugger since its inception). |
I've added a shortcut for "run to address". Similar to the "scroll-to address" function, it opens the (right-click) context menu and sets keyboard focus on the appropriate field. I understand that it can be annoying that we don't follow existing debugger shorcut conventions. Though one practical problem we have is that many keys (e.g. F9-F12) are already in use by openMSX itself. For example F9 is bound to "toggle throttle" and it has been for 15, maybe 20, years, people are used to this. I think most openMSX users don't use the debugger. So we have to make a tradeoff between following common debugger conventions and not breaking the workflow of existing openMSX users (who maybe aren't interested in the debugger). You can of course edit the shortcuts and set them to your preferences. And if you have concrete suggestions for better default shortcuts then please share. But do keep the existing openMSX hotkey bindings in mind. |
Don't get this. Also F7 and F8 are bound to OpenMSX itself (SELECT and STOP) but yet you've managed to assign them to the debugger. Can't the key binding just be overriden when the execution is stopped and then restored to their original function once the emulator continues execution? |
We have several levels of input handling. I'll try to give a (simplified) overview:
So, currently, because F9 is (by default) bound to a hotkey it's not possible to also use it as a GUI shortcut (or at least the shortcut will never trigger). On the other hand it is possible to use the same keys for GUI shortcuts and for MSX keys (e.g. F7), because we can know whether to pass the event to the GUI (when a GUI window has focus) or to the MSX (when the main openMSX window has focus). |
Thank you for the detailed explanation, that explains everything. Thank god the classic debugger still works :) |
Can you make really explicit what you need the old debugger for, which you cannot do with the new one? |
Use a classic keymap I am accustomed to (not only on OpenMSX but also on IntelliJ, Lazarus and other IDEs). Since I can't find any advantage to use the new GUI, I will remain stuck to the classic one as long as I feel comfortable with it. I will stay tuned though since I understand this might change in the future. |
Well, you can still customize it to your needs and use whatever key bindings you want. You might have to change the global openMSX binds as well though, as Wouter explained. |
I imagine it should be possible with a bit of rework to tweak the wiring so the GUI shortcuts used by debugger are prioritized when debugger is active? Seems solvable. On this old idea:
If that’s deemed valuable for some users later you could take a state snapshot when resuming emulation and have an option to use state from that snapshot. But i tend to agree seing the live version is more desirable most of the time. |
I would do it if I hadn't other options. Luckily enough, I can use the old debugger and I will. |
If I may say so, and I am merely an onlooker here, you could be more cooperative considering this is a hobbyist project trying to move forward. I feel if you put a little more energy using the tool, your feedback would be useful and the author would be more motivated to fix issues. |
Hmmm. Why don't you think I am cooperative? Unlike many other users, I have reported tons of bugs, observations and suggestions. But, if at this stage of the development I feel more comfortable with the old UI, I will use it in a regular basis. Can't see what's wrong with that. Of course, I will continue testing the new development and leaving my findings here. |
Sorry for meddling, this is not my project, i’ll let maintainers do their thing :) |
That's fine of course. But please keep in mind that it's not very likely that we'll do any more work on the old debugger. Our focus will be on the new one in openMSX itself and I don't expect any time to get spent on the old one anymore. So, if it breaks due to some reason, it is not likely to get repaired. Please do me a favour and try to use the new debugger every now and then to be able to keep giving your valuable feedback to us on our actively developed software :) |
Sure, I will continue testing the new software and reporting my feedback (even if for my personal use I stick to older versions of OpenMSX). |
Hi,
I've opened this issue to continue the discussion previously held on this issue from the Debugger repository:
openMSX/debugger#190
Let me quote the last Wouter's response:
Thank you for your comments. I didn't notice that the windows are dockable. I've tried it out and works flawlessly!! Thank you very much, I love it. Once I understand how it works, I admit you have been made a huge improvement here. Congrats!
About the keybindings... this is still an unsolved issue. Having to share the keybindings between the debugger and the emulator itself makes difficult to assign specific MSX keys when using a small keyboard (e.g. a laptop or a bluetooth portable keyboard) with a reduced number of keys.
Are you sure guys the framework you're using for the new UI doesn't allow assigning priority to the keybindings (or just making them active/inactive when getting/losing the focus of each window)?
Other thoughts about the new UI:
-I find the separate console window much less convenient than the former one. Having the transparent console bound to the emulator Windows was ideal (especially when using the "type" command to enter text in a more comfortably way). I would love a configuration option to allow the classic behaviour.
-I see that the value of registers are refreshed in real-time now (not only at break time). How does this impact the performance of the Emulator? Can this behaviour be disabled? Sometimes it was very useful to me to watch the last register values even if the emulation continues running (e.g. I can copy them to my notes while the emulation is running waiting for the next event to break the execution).
-Definitely, an option to make the debugger "always-on-top" would be a dream, especially when using a laptop without a secondary screen. I understand the classic UI hadn't this feature either, but I always missed it.
And this is it so far. Thank you for your efforts and congrats for the new UI. Still some things must be ironed out but I'm confident we've getting a new winning horse here.
The text was updated successfully, but these errors were encountered: