次の方法で共有


IVsSolutionBuildManager.DebugLaunch Method

Launches the startup project specified by the solution as the debug project.

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

Syntax

'宣言
Function DebugLaunch ( _
    grfLaunch As UInteger _
) As Integer
'使用
Dim instance As IVsSolutionBuildManager
Dim grfLaunch As UInteger
Dim returnValue As Integer

returnValue = instance.DebugLaunch(grfLaunch)
int DebugLaunch(
    uint grfLaunch
)
int DebugLaunch(
    [InAttribute] unsigned int grfLaunch
)
function DebugLaunch(
    grfLaunch : uint
) : int

Parameters

Return Value

Type: System.Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsSolutionBuildManager::DebugLaunch(
   [in] VSDBGLAUNCHFLAGS grfLaunch
);

The solution build manager tracks the startup project or projects that an operation will be performed against when the F5 key is pressed through entries in the Solution Configuration property pages. IVsSolutionBuildManager is called by the environment to determine when the F5 key will be enabled. When the environment is in debug mode, it disables the F5 key until either debugging reaches a breakpoint, in which case the F5 key will be enabled with a Continue command, or when debugging stops, in which case the F5 key will be enabled with a Start command.

When F5 is pressed, DebugLaunch will be called by the debug manager component of the environment to begin operation on the startup project or projects. At that point, the environment calls IVsDebuggableProjectCfg:: DebugLaunch on the active project configuration of each of the startup projects, which launches a debug session on the project configuration target using project-specific information.

注意

The launched debugger may be a managed or native debug engine from Microsoft, or a custom debugger of your own design as a VSIP developer.

IVsSolutionBuildManager knows which project or projects to include in the build process based on the settings in the Solution Configuration property pages, and the individual projects know what needs to be run when the DebugLaunch is called based on the configuration settings as displayed in the Project Configuration property pages. For more information, see Managing Configuration Options.

In some cases, you might want to have a package other than the debugger launch when the F5 key is pressed. In that case, your VSPackage, through its implementation of IVsSolutionBuildManager and DebugLaunch, determines the startup project or projects against which the package will operate and begin processing.

Permissions

See Also

Reference

IVsSolutionBuildManager Interface

IVsSolutionBuildManager Members

Microsoft.VisualStudio.Shell.Interop Namespace