locked
VS Shell 2015 hide Exception settings tool window and Debug / Windows / Exception Settings menu item RRS feed

  • Question

  • Hello,

    Could You please help me to hide the exception settings tool windows and the related Debug / Windows / Exception Settings menu item in my app?

    Thanks,

    • Moved by CoolDadTx Friday, May 27, 2016 2:41 PM Extensibility related
    Friday, May 27, 2016 9:44 AM

Answers

  • Hi,

    I have found a solution. Uncomment and therefore remove the following entities in pkgundef file

    [$RootKey$\Packages\{d549bc66-c17b-4409-8729-583e60dc0bc1}]
    [$RootKey$\ToolWindows\{605322a2-17ae-43f4-b60f-766556e46c87}]
    In this case the Exception settings is removed. It is not opening when Reset the layout

    • Marked as answer by tstanitz Friday, June 3, 2016 3:34 PM
    Friday, June 3, 2016 3:34 PM

All replies

  • Hi tstanitz,

    >>"Could You please help me to hide the exception settings tool windows"

    To hide or close the exception setting window, you could use following code.

    DTE2 dte = (DTE2)this.ServiceProvider.GetService(typeof(EnvDTE.DTE));
    foreach (WindowBase window in dte.Windows)
    {
        if (window.Caption == "Exception Settings")
        {
            //hide Exception Settings window
            window.Visible = false;
            //close Exception Settings window
            window.Close(EnvDTE.vsSaveChanges.vsSaveChangesYes);
        }
    }

    "the related Debug / Windows / Exception Settings menu item in my app"

    There is a similar thread which discuss how to disable menu commands, link below is for your reference.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/f3acc18c-b176-4f06-a8d1-cccff3d4bf7f/how-to-disable-and-enable-menu-commands-in-vspackage?forum=vsx

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, May 30, 2016 8:46 AM
  • Hello Li Wang,

    Thanks the answer, but I was not able to use it, because the dte.Windows is a 

    public interface Windows : IEnumerable

    but the WindowsBase is not a known type? Did I miss some reference?

    This solution just closes automatically the Exception Settings tool window? I would like to de-register somehow like I did with the Server Explorer Tool Window

    // Server Explorer Tool Window
    [$RootKey$\ToolWindows\{74946827-37a0-11d2-a273-00c04f8ef4ff}]

    in the application.pkgundef. Because in this case when I set the Reset Window Layout in the Window tool menu it do not show the Server Explorer, but I am affraid the Exception Setting will be visible after the mentioned solution.

    Is it possible to de-register the exception settings toolwindow or the whole package somehow?

    Thanks

      

    Tuesday, May 31, 2016 7:38 AM
  • Hi,

    I have found a solution. Uncomment and therefore remove the following entities in pkgundef file

    [$RootKey$\Packages\{d549bc66-c17b-4409-8729-583e60dc0bc1}]
    [$RootKey$\ToolWindows\{605322a2-17ae-43f4-b60f-766556e46c87}]
    In this case the Exception settings is removed. It is not opening when Reset the layout

    • Marked as answer by tstanitz Friday, June 3, 2016 3:34 PM
    Friday, June 3, 2016 3:34 PM