Skip to content
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

Change "Restart with add-ons disabled" to also set log level to debug #11538

Open
Qchristensen opened this issue Sep 1, 2020 · 23 comments
Open

Comments

@Qchristensen
Copy link
Member

Is your feature request related to a problem? Please describe.

The main use case of NVDA's "Restart with add-ons disabled" option (in the list when NVDA+Q is pressed), is to troubleshoot problems. When troubleshooting problems, it is also useful to have debug logging enabled.

Describe the solution you'd like

I suggest having this option restart with add-ons disabled, AND the log level set to debug for this instance.

A couple of ways this could be done:

  • Place a label under the list which is read automatically when the option is selected which warns that debug logging will also be used.

  • Display a warning dialog when activating this option that states debug logging will be used (and potentially also listing the add-ons which are currently enabled which will be disabled).

Describe alternatives you've considered

Currently, when troubleshooting an issue with a user, I request that they enable debug logging manually:

  1. Press NVDA+control+g
  2. Press tab to "logging level"
  3. Press down arrow to "Debug"
  4. Press enter to set
  5. Press NVDA+control+c to save

Having this level of logging enabled automatically when restarting with add-ons disabled would make that process much easier for users who may have varying levels of skill.

Additional context

There are likely a few cases where restarting with add-ons disabled may be used NOT in a troubleshooting situation. In this case, increasing the log level should not pose any problem. In terms of privacy, as always, the log is never sent anywhere unless the user manually locates the file and sends it somewhere, and I believe displaying a warning at the start should help alleviate any potential concerns over the logging level being changed.

My thought over adding a warning is also that it means the text of the option ("Restart with add-ons disabled") does not need to be changed - which saves it from becoming quite long, and potentially confusing.

@XLTechie
Copy link
Collaborator

XLTechie commented Sep 1, 2020 via email

@Qchristensen
Copy link
Member Author

I was aiming for the simplest solution, but certainly looking at the restart options, the quit dialog currently has four options:

  • Exit
  • Restart
  • Restart with add-ons disabled
  • Restart with debug logging enabled

If we were to have a "Restart in debug mode" option, I'd be inclined to have that replace the last two options. It would mean that in order to restart with add-ons running and debug logging, you'd need to set that from the general settings screen. The people who may need that are those testing add-ons who are likely advanced enough that the extra steps to change the logging level specifically should not be a problem.

Certainly either way would resolve the issue. Replacing "Restart with add-ons disabled and "restart with debug logging enabled" with one option would remove the possibility of someone going down one too many options when trying to troubleshoot and accidentally restarting with debug logging but add-ons still enabled.

@CyrilleB79
Copy link
Collaborator

I fully agree with this feature request: a simple method to restart with add-on disabled and log level set to DEBUG is clearly missing in NVDA's core.

It would mean that in order to restart with add-ons running and debug logging, you'd need to set that from the general settings screen. The people who may need that are those testing add-ons who are likely advanced enough that the extra steps to change the logging level specifically should not be a problem.

No, this is a wrong assumption. As an add-on author, I may ask users experimenting some issues to provide a log on debug level normally and of course add-on activated.
So there are at least two use cases for simple users:

  • testing NVDA: log level = DEBUG and add-on disabled
  • testing an add-on: only log level = DEBUG

If no other use case is identified, I would be inclined to keep 4 options, but to replace "Restart with add-on disabled" by "Restart in debug mode" (add-on disabled, log level = DEBUG and maybe something else one day as suggested by @XLTechie)

I had also in my mind to create an add-on providing a GUI to restart specify any command line parameter, for advanced test purpose. Anyway, these would be targeted for advanced tester and thus not adapted for NVDA core. We should keep in mind that the added or modified options should remain dedicated to simple users who are requested to perform simple tests.

Replacing "Restart with add-ons disabled and "restart with debug logging enabled" with one option would remove the possibility of someone going down one too many options when trying to troubleshoot and accidentally restarting with debug logging but add-ons still enabled.

Well, selecting the wrong option does not seem a problem for me. If a user is instructed to provide a log and selects the wrong option, this will be visible in the log.

@josephsl
Copy link
Collaborator

josephsl commented Sep 1, 2020 via email

@CyrilleB79
Copy link
Collaborator

Hi, at least for installed copy, I think it would be much better to tell users to pass in command-line switches from Run dialog, as both options can be done in one sitting.

Sorry, I disagree again. The real question is when should we provide a GUI option in the exit dialog and when is a command line flag enough. IMO:

  • The command line flags are enough if they target intermediate to advanced user or developers/testers
  • The exit dialog options are required if they target basic users or if they need to be used frequently

A basic user reporting (e.g. on a mailing list) that NVDA or an add-on does not work should be given instructions as simple as possible. I do not consider the command line simple and user-friendly for a basic user.

@josephsl
Copy link
Collaborator

josephsl commented Sep 1, 2020 via email

@josephsl
Copy link
Collaborator

josephsl commented Sep 1, 2020

Hi,

Expanding on what I wrote above:

I think this proposal describes a tendency that we (users and developers) find ourselves in from time to time: trying to sort issues with add-ons in a way that is easy for everyone. While I agree with this premise, I believe that there is a bigger topic to discuss: actual communication between users and developers.

When a user posts a bug report about NVDA, if the issue stems from an add-on, we would advise users to disable the affected add-on. As noted several times, currently disabling add-ons do not touch logging level whatsoever unless specific steps are taken. Only when add-on authors or power users advise people to restart with debug logging enabled, or when the logging level is changed to "debug" will add-ons log debug information. At least this helps developers understand what's going on provided that they have expert knowledge on their add-ons.

Now suppose that as Luke and Quentin (and many others) pointed out, we combine a way to get debug information while add-ons are disabled. If I understand it correctly, this is same as setting logging level to debug and then restarting NVDA with add-ons disabled. Quentin's alternative (setting log level from general settings panel) is a viable procedure provided that users understand what's going on, but then we circle back to the status quo. A compromise might be a confirmation screen when "restart with debug logging" is selected, asking users if add-ons should be disabled. But I think it doesn't touch the heart of the matter: effective debugging and discourse surrounding it.

Because of this, I think we may need to think about possible factors that have led to this proposal. Certainly ease of debugging is one factor, but then I would like to carefully say that debugging is not easy as people may appear to suggest. Setting up for debug mode, while possible, is just one step in effective add-on debugging - an effective add-on issue debugging involves good (or rather, thorough/expert level) knowledge about an add-on (or two), and dedication to think for a long time and come up with solutions and balancing pros and cons.

Not only that, I think effective communication and feedback loop between users and developers is key, as that is one of the visible results of effective debugging (the most visible result being the bug fix and feedback afterwards). Getting a debug log is one thing, even when using the proposal noted here. But developers should be willing to "paraphrase the bug" i.e. explain the reported bug in terms developers can internalize, then think about causes, effects, solutions, and possible regressions and issues once the chosen solution is deployed, and an added bonus of explaining all this in a user-friendly way (trust me, this takes time to develop).

As I noted above, whatever the outcome will be, I'm willing to adopt, but I think it would be good to consider the paths that led us to this proposal, because the issue of effectively debugging add-on issues cannot be solved by renaming exit routes alone.

Thanks.

@CyrilleB79
Copy link
Collaborator

Huh. Not sure to have understood all your words Joseph, sorry. Anyway, reading you and thinking again to this issue, I can see 3 use cases.

  1. A user encounters an expected behaviour using NVDA:
    An easy way to restart NVDA with add-on disabled allow to discriminate easily if he should report the issue to NVDA or to add-on authors.
  2. A user reports an issue to NVDA (add-ons disabled confirms NVDA's responsibility):
    An easy way to restart NVDA with add-ons disabled and log level on DEBUG should help the user to provide a log with useful information to NVDA developers.
  3. A user reports an issue to an add-on author or maintainer regarding his add-on.
    An easy way to restart NVDA log level on DEBUG (but add-ons enabled, ideally only one) should help the user to provide a log with useful information to NVDA developers.

Maybe there are other use cases, feel free to comment.

Note that in use case 1, to discriminate the add-on responsible of the issue, there should be a way to restart NVDA with only one add-on enabled; but that's a separate issue.

Of course, as you pointed out Joseph, it's just a part of the problem. And a good communication with a basic user is required to understand all the steps that were executed, the conditions, and also to give clear instructions if tests are required.

@DrSooom
Copy link

DrSooom commented Sep 1, 2020

Suggestion:

  • [radio buttons] Exit, Restart, Install pending update
  • [checkboxes] Disable all add-ons, Enable debug logging

These two checkboxes are only selectable if the radio button "Restart" was selected before. Thus the options names aren't so verbose and the process is easier to explain to beginners. And additional restart options (e.g. "Use no braille display") can be easily added later in the list of checkboxes. This also means that combining restart options is much easier than using dropdown list entries, which is the case yet.

@DrSooom
Copy link

DrSooom commented Sep 1, 2020

See also: Issue #9686

@lukaszgo1
Copy link
Contributor

I'm personally a big fan of @DrSooom 's idea from the commend above. It'd be very easy to explain to beginners how to restart with desired options and at the samae time give power users to restart with exactly parameters they need.

@Qchristensen
Copy link
Member Author

Firstly, I agree, I hadn't considered users testing issues for an add-on author, so having the ability to restart with add-ons enabled and debug logging is definitely valid. I was thinking re the suggestion for restarting with just ONE add-on enabled, it might be best to add that to the add-on manager screen - it already gives you a list of add-ons, so it would be easy to select the one you want in that list, then press a keystroke / activate a button to restart with just that add-on enabled.

Continuing that thought, if that were possible, would there still be a need for an exit screen option to restart with ALL add-ons enabled and debug logging?

I still like the one drop down list for the added simplicity over a drop down list and checkboxes, but either way is definitely workable, and easier than asking a user to go into the settings, change debug level, then exit and select an option there.

@XLTechie
Copy link
Collaborator

XLTechie commented Sep 2, 2020

Note that this issue is related to, though not identical with, #9686 , if that hasn't already been pointed out.

@Qchristensen wrote:

Firstly, I agree, I hadn't considered users testing issues for an add-on author, so having the ability to restart with add-ons enabled and debug logging is definitely valid. I was thinking re the suggestion for restarting with just ONE add-on enabled, it might be best to add that to the add-on manager screen - it already gives you a list of add-ons, so it would be easy to select the one you want in that list, then press a keystroke / activate a button to restart with just that add-on enabled.

I agree, both for the use case, and where it should be done. However, #11317 seems relevant here for some cautions about scope.

Continuing that thought, if that were possible, would there still be a need for an exit screen option to restart with ALL add-ons enabled and debug logging?

If that option was implemented, maybe not. But that one seems more complex (see the above referenced issue), and seems like it might meet with much more friction.

I still like the one drop down list for the added simplicity over a drop down list and checkboxes, but either way is definitely workable, and easier than asking a user to go into the settings, change debug level, then exit and select an option there.

Agreed on both points. I don't personally mind a dropdown with more than a few options to cover the possibilities (or probabilities). But if it seems that the radios and checkbox mode is preferable, it would still be better than the current arrangement.

Another possibility might be something like this:

Keep exit, restart, and Install Pending Update as menu items.
But make restart a split button (similar to what you proposed for the exit button on the main menu some time ago).
If it is pressed, it just restarts.
but if it is expanded, you can choose from menu options such as "Debug logging with add-ons", "Debug logging with add-ons disabled", and whatever else needs to go there.

@josephsl
Copy link
Collaborator

josephsl commented Sep 2, 2020 via email

@CyrilleB79
Copy link
Collaborator

Hi

There are good ideas in all proposition that were made.
The split button is interesting. But being a less common UI element than basic buttons, radio buttons, dropt-down list or checkboxes, it may require additional explanations for some users (again in the case of a basic user instructed to perform additional tests).
I prefer the drop-down list to radio-buttons because it takes less space on the screen and because users are already used to it in NVDA'exit dialog and in Windows exit dialog (pressing Alt+F4 from the desktop).
Anyway, I am happy anyway if split-button or radio buttons are adopted.

An other interesting option that I prefer would be:

  • a drop-down list (as currently) with the 4 following options:
    • exit
    • restart
    • restart specifying some extra options
    • install pending update
  • some checkboxes (and maybe other UI elements) to specify:
    • disable add-ons
    • set log level to debug
    • maybe in the future disable all add-ons but one
      Excepted the drop-down list, all the UI elements should be disabled or hidden unless "Restart specifying extra options" is selected. Thus the user can tab from the drop-down list directly to the "OK" button unless he has to specify extra options. All these options should be applied only for next restart on the contrary to the options or choices made in the setting panels or in the add-on manager window.

What do you think of this last proposal?

@XLTechie
Copy link
Collaborator

XLTechie commented Sep 3, 2020 via email

@XLTechie
Copy link
Collaborator

XLTechie commented Sep 3, 2020 via email

@mzanm
Copy link
Contributor

mzanm commented Nov 22, 2021

Hello, I agree a dropdown list with exit and restart and then when restart is chosen 2 checkboxes for disable addons and enable debug logging is a good idea, because you can choose to do both or one of them easily instead of adding an option for each possibility.

@mzanm
Copy link
Contributor

mzanm commented Jan 3, 2022

Hello, is it ok if I work on this? Thank you.

@josephsl
Copy link
Collaborator

josephsl commented Jan 3, 2022

Hi,

I'm not NV Access employee, but I would say it would be good to play with at least a prototype/pull request artifact. That way we can have something to think about as we discuss this issue further and revisit our comments from 2020, taking into account the differences between the add-ons environment between then and now (January 2022).

Thanks.

@mzanm
Copy link
Contributor

mzanm commented Jan 3, 2022

I've made a pr.
#13214
What do you all think about this, would a third dropdown list item with restart options better or is the way it is now better? Let me know, Happy to make any changes.

@josephsl
Copy link
Collaborator

josephsl commented Jan 3, 2022 via email

@CyrilleB79
Copy link
Collaborator

To all participants of this issue:

This issue has not been implemented for 4 years. The discussion regarding an improved UX for the exit dialog has been quite difficult. And when a consensus has been found and implemented (PR #13214), the PR has been blocked by a technical difficulty and has been abandoned. Though, implementing this issue would still be very useful when making support to provide simpler instructions.

I do not wish to spend so much time on this; the better is the enemy of the good.

So I have opened #17043 to address the main concern of this issue, letting the exit dialog UX redesign for a future but less urgent work.

seanbudd pushed a commit that referenced this issue Aug 29, 2024
Fixes the initial request of #11538.

Summary of the issue:
When a user encounters an issue with NVDA, a dev diagnosing the issue may need to ask them a log. In this situation, the most common use case is to ask a log with add-ons disabled (to eliminate possible add-on interferences) and log level set to debug (to get the maximum information to help debugging). Though, NVDA does not provide a handy way to restart with add-ons disabled and log level set to debug.

Description of user facing changes
NVDA's exit dialog now provides the 4 following permanent options:

"Exit" (as before)
"Restart" (as before)
"Restart with add-ons disabled and debug logging", replacing "Restart with add-ons disabled". This option may be used to discriminate if a bug comes from NVDA or from add-ons, and in case it comes from NVDA, help a developer to investigate and fix it.
"Restart with debug logging", just renamed from "Restart with debug logging enabled". This option is useful to get a log to investigate a bug in an add-on.
The non-permanent option to install pending updates remains unchanged.

And the options in secure mode remain unchanged. More specifically, "Restart with add-ons disabled" remains without enabling debug logging because logging is disabled in secure mode.

Description of development approach
Added the RESTART_WITH_ADDONS_DISABLED_AND_DEBUG_LOGGING item in gui.exit._ExitAction enum. And removed the unneeded items of this enum to display the combo-box. More specifically, RESTART_WITH_ADDONS_DISABLED_AND_DEBUG_LOGGING and RESTART_WITH_ADDONS_DISABLED cannot coexist in the allowed values of the combo-box.

Also renamed RESTART_WITH_DEBUG_LOGGING_ENABLED to RESTART_WITH_DEBUG_LOGGING so that RESTART_WITH_ADDONS_DISABLED_AND_DEBUG_LOGGING does not become a longer RESTART_WITH_ADDONS_DISABLED_AND_DEBUG_LOGGING_ENABLED; same (and more importantly) for the displayed string. Moreover, technically there is no debug logging that we can enable or disable in NVDA, but a debug level that may be set to "disabled", to "debug" or other intermediate levels.

At last, "Restart with debug logging" is not named "Restart with add-ons enabled and debug logging", because the add-ons can still be disabled all individually in the add-on store.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants