See the question and my original answer on StackOverflow

To determine a menu item id, you can use the EnableVSIPLogging registry key described here: Using EnableVSIPLogging to identify menus and commands with VS 2005 + SP1.

Note if you use Visual Studio 2017, you will have to do it in VS' private registry, using the procedure described here: Access Visual Studio 2017's private registry hive, and the EnableVSIPLogging value would be located in a key that will look like this (5e87da33 will be something different, specific to your setup):

<your private key name>\Software\Microsoft\VisualStudio\15.0_5e87da33\General

Once this is done you can CTRL+SHIFT click on "Test" and it will show you this:

enter image description here

Don't forget to do the reverse.

To show your own option page, create a menu item (using vsct, etc.), and call Package.ShowOptionPage when clicked.