Compartir a través de


IVsProjectCfgDebugTargetSelection Interface

Allows a project to participate in the debug target menu controller feature. This interface is optional.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)

Syntax

'Declaration
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)> _
<GuidAttribute("255B9803-BA83-421B-924E-CDE7FAAA86A3")> _
Public Interface IVsProjectCfgDebugTargetSelection
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
[GuidAttribute("255B9803-BA83-421B-924E-CDE7FAAA86A3")]
public interface IVsProjectCfgDebugTargetSelection
[InterfaceTypeAttribute(ComInterfaceType::InterfaceIsIUnknown)]
[GuidAttribute(L"255B9803-BA83-421B-924E-CDE7FAAA86A3")]
public interface class IVsProjectCfgDebugTargetSelection
[<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)>]
[<GuidAttribute("255B9803-BA83-421B-924E-CDE7FAAA86A3")>]
type IVsProjectCfgDebugTargetSelection =  interface end
public interface IVsProjectCfgDebugTargetSelection

The IVsProjectCfgDebugTargetSelection type exposes the following members.

Methods

  Name Description
Public method GetCurrentDebugTarget Retrieves the command that is currently latched on the debug target menu controller.
Public method GetDebugTargetListOfType Retrieves a list of strings your project requires for the specified debug target type command.
Public method HasDebugTargets Retrieves a list of supported debug target types. This list is returned as a set of "<Guid>:<Id>" pairs as an array of strings.
Public method SetCurrentDebugTarget Sets the current debug target when the user picks an item on the debug target menu controller.

Top

Remarks

This interface is retrieved by a QueryInterface from the project's configuration object that implements IVsDebuggableProjectCfg.

The debug target menu controller acts as a short cut for directing the target for debugging of the project that otherwise is normally set by choices made on the Debug page of the project's configuration-dependent settings. This feature is defined in a manner that allows many project kinds to participate with the feature. New project kinds can define their own debug target-type commands (with icons) for the menu controller. One package is responsible for defining the new debug target type commands/icons. These definitions are made in the standard way (that is, using a .vsct file) for adding new commands for the IDE, but with the following special requirements:

  • The commands should be owned by the debug target handler package.

  • The commands should be placed in a group on the debug target menu controller.

Examples

The following example demonstrates how to define a new DebugTargetType.

<Button guid="guidWindowsImmersiveDebugTargetTypesCmdSet" id="cmdidWindowsImmersive_Simulator" priority="0x1000" type="Button">
    <Parent guid="guidDebugTargetHandlerPackage_string" id="DebugTargetMenuControllerGroup"/>
    <Icon guid="guidWindowsImmersiveSimulatorImage" id="bmpPicSimulator" />
    <CommandFlag>TextChanges</CommandFlag>
    <CommandFlag>DynamicVisibility</CommandFlag>
    <CommandFlag>DefaultInvisible</CommandFlag>
    <CommandFlag>DefaultDisabled</CommandFlag>
    <CommandFlag>DynamicItemStart</CommandFlag>
    <Strings>
        <CommandName>cmdidWindowsImmersive_Simulator</CommandName>
        <ButtonText>Simulator</ButtonText>
    </Strings>
</Button>
<GuidSymbol name="guidDebugTargetHandlerCmdSet" value="{6E87CFAD-6C05-4adf-9CD7-3B7943875B7C}}">
    <IDSymbol name="DebugTargetMenuControllerGroup" value="0x1000" />
    <IDSymbol name="DebugTargetMenuControllerFooterGroup" value="0x2000" />
    <IDSymbol name="DebugTargetMenuControler" value="0x0100" />
    <IDSymbol name="cmdidDebugTargetAnchorItem" value="0x0101" />
</GuidSymbol>

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace