共用方式為


IVsProjectCfgDebugTargetSelection Interface

Definition

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

public interface class IVsProjectCfgDebugTargetSelection
public interface class IVsProjectCfgDebugTargetSelection
__interface IVsProjectCfgDebugTargetSelection
[System.Runtime.InteropServices.Guid("255B9803-BA83-421B-924E-CDE7FAAA86A3")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsProjectCfgDebugTargetSelection
[<System.Runtime.InteropServices.Guid("255B9803-BA83-421B-924E-CDE7FAAA86A3")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsProjectCfgDebugTargetSelection = interface
Public Interface IVsProjectCfgDebugTargetSelection
Attributes

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>  

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.

Methods

GetCurrentDebugTarget(Guid, UInt32, String)

Retrieves the command that is currently latched on the debug target menu controller.

GetDebugTargetListOfType(Guid, UInt32)

Retrieves a list of strings your project requires for the specified debug target type command.

HasDebugTargets(IVsDebugTargetSelectionService, Array)

Retrieves a list of supported debug target types. This list is returned as a set of "<Guid>:<Id>" pairs as an array of strings.

SetCurrentDebugTarget(Guid, UInt32, String)

Sets the current debug target when the user picks an item on the debug target menu controller.

Applies to