Reputation: 2571
To debug Visual Studio extensions you can start an experimental instance with a certain "RootSuffix". See https://learn.microsoft.com/en-us/visualstudio/extensibility/the-experimental-instance?view=vs-2022.
Is there a way to know the provided rootsuffix in the code of your extension?
I.e. "Exp" if the instance was started with "devenv.exe /RootSuffix Exp"
Upvotes: 1
Views: 144
Reputation: 2571
Can be retrieved with following code:
IVsAppCommandLine cmdline = (IVsAppCommandLine)GetService(typeof(SVsAppCommandLine));
cmdline.GetOption("rootSuffix", out var present, out var value)
Upvotes: 1
Reputation: 26
The DTE object has a CommandLineArguments property which contains the information you need.
Upvotes: 1