Search code examples
visual-studiodebuggingsettingsadd-in

Programmatically change Visual Studio Options


How do I programmatically set and unset Visual Studio Options?

enter image description here

I have done the research and troubleshooting and apparently it is not possible.

Here is a question I answered specifying why it's not possible to programmatically click buttons in the VS Options Dialog: Programmatically reset VisualStudio shortcuts.

I don't need to click a button, I need to change a boolean setting as per the screenshot.

Might there be any undocumented methods I can use?


Solution

  • Just use:

    dte.Properties["Debugging", "General"].Item("EnableExceptionAssistant").Value=false;
    

    Most of the options can be retrieved and set this way. See also:

    Options Page, Debugging Node Properties

    HOWTO: Getting properties from the DTE.Properties collection of Visual Studio .NET.