codecadwallader / codemaid

CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
http://www.codemaid.net
GNU Lesser General Public License v3.0
1.92k stars 362 forks source link

Options not responding to clicks could not select other option pages #500

Open lancecontreras opened 6 years ago

lancecontreras commented 6 years ago

Environment

Description

After visual studio being open for a while, I went to options, then the option dialog box shows up but I can't select from the side. It only defaults to "General" even if I'm clicking other options like Visual Studio, File Types. The workaround for this is to restart the visual studio. I'm not sure if it's a codemaid issue or a visual studio issue.

Steps to recreate

  1. Open up visual studio and work for a while
  2. Leave visual studio opened ( I left mine overnight)
  3. Try to open code maid options.
  4. Try to select different section from the side. It doesn't go away from the "General" page.

Current behavior

Could not view other option pages aside from the General page.

Expected behavior

I should be able to see other pages such as Visual Studio and File type or reorganize aside from the General page. 11-14-2017 9-47-16 am

codecadwallader commented 6 years ago

Thanks for reporting the issue. The options dialog is a modal dialog similar to Visual Studio's options, meaning that it expects to take control of mouse/keyboard input until it is closed. When the issue occurs, here are a couple things to check:

  1. Are there any other dialog boxes open? Perhaps another dialog bog (e.g. a confirmation window) actually has the top most control and is trying to take any mouse/keyboard behaviors? I've seen this, especially with multiple monitors.

  2. If you press Escape, that will cause CodeMaid's window to close.. IF it is indeed on top and accepting mouse/keyboard control. If something else is on top, perhaps pressing Escape multiple times will help clear out the other dialog box(es) and then CodeMaid.

  3. If you are able to get the dialog box closed, if you reopen it does the issue come right back?

dfoulk commented 6 years ago

@codecadwallader I experienced the same issue with no additional dialogs opened. After experiencing the issue, I restarted VS2017 and reopened the CodeMaid Options window- and everything worked as expected.

That being said; the issue did comeback and I can tell you that using the ESC to close the CodeMaid Options window does not resolve the issue as the menu items still do not work (after reopening). Additionally, the checkboxes in the window work, as well as the Save button- only the menu items appear to be broken when this happens.

Any ideas on other things we can try?

Thanks, -Derek

codecadwallader commented 6 years ago

@dfoulk thanks for the additional detail. When you say only the menu items appear to be broken, do you mean that the options window largely works as expected - it's just that you can't navigate between pages? I think I may have misunderstood the OP if the options window is otherwise working fine (e.g. you can still interact with the checkboxes, etc. on the current page).

dfoulk commented 6 years ago

@codecadwallader Yes, that's what is happening. You cannot navigate between pages- but the first page that is displayed works just fine (you can interact with the various inputs). We just cannot navigate to other pages.

I will attempt to screen capture the issue for you...

codecadwallader commented 6 years ago

Ok thanks, that helps me understand better the issue. It sounds like there must be some scenario where the TreeView selection behavior is failing. The relevant class that is listening/dispatching selection events is https://github.com/codecadwallader/codemaid/blob/master/CodeMaid/UI/TreeViewBindableSelectedItemBehavior.cs

Anyone who can reproduce the issue, are you willing to attach a debugger and see if the event handlers in that class are getting fired? Also, I'm curious to know what version of the OS and .NET Framework people have installed in case that points to a common pattern.

dfoulk commented 6 years ago

Windows 10 (Build 17134) .NET Framework 4.7.1

dfoulk commented 6 years ago

Can you provide me with a little instruction on how to attach a debugger to a VS extension? I'd be happy to do so, just not sure how I accomplish that.

codecadwallader commented 6 years ago

Absolutely! Please take a look at http://www.codemaid.net/contribute/ for setup/debug steps and let me know if you have any questions. :)