Determines whether or not the F5 (debug start) key should be enabled.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
‘선언 Function QueryDebugLaunch ( _ grfLaunch As UInteger, _ <OutAttribute> ByRef pfCanLaunch As Integer _ ) As Integer ‘사용 방법 Dim instance As IVsSolutionBuildManager Dim grfLaunch As UInteger Dim pfCanLaunch As Integer Dim returnValue As Integer returnValue = instance.QueryDebugLaunch(grfLaunch, _ pfCanLaunch)
int QueryDebugLaunch( uint grfLaunch, out int pfCanLaunch )
int QueryDebugLaunch( [InAttribute] unsigned int grfLaunch, [OutAttribute] int% pfCanLaunch )
abstract QueryDebugLaunch : grfLaunch:uint32 * pfCanLaunch:int byref -> int
function QueryDebugLaunch( grfLaunch : uint, pfCanLaunch : int ) : int
[in] Specifies how the debugger is launched. See __VSDBGLAUNCHFLAGS for more information.
[out] Pointer to a flag indicating whether or not the debug operation can be launched.
HRESULT IVsSolutionBuildManager::QueryDebugLaunch( [in] VSDBGLAUNCHFLAGS grfLaunch, [out] BOOL *pfCanLaunch );
The solution build manager tracks which project is the startup project. The debugger manager component of the environment does not know directly what the startup project is, so it calls QueryDebugLaunch to ask the solution build manager whether or not the F5 key should be enabled for the startup project, or for the selected project if DBGLAUNCH_Selected is set.
Then, if a user presses the F5 key, the debugger manager component of the environment calls this method again and DebugLaunch sets pfCanLaunch to true. The startup projects' configuration selected for the active solution configuration then launches the appropriate debugger process during the call to DebugLaunch when the F5 key is pressed.
The F5 command causes the debugger manager component of the environment to call DebugLaunch on each startup project, for the active project configuration (selected by the active solution configuration), or any other package that traps that command.
When the user presses the F5 key, the debugger manager component of the environment enters the debug mode and calls DebugLaunch which queries the projector projects through their implementation of DebugLaunch on the active project configuration(s) on the active project configuration of each of the startup projects. When the environment is in debug mode, the project or projects being debugged know the state of the process, whether it is running or at a breakpoint. The debugger manager component of the environment calls QueryDebugLaunch and enables the F5 key with Continue when a breakpoint is reached in the debugging process.
At the point where the environment exits debug mode because it finished or was canceled by the user and you are back in design mode, the F5 key is enabled.
QueryDebugLaunch and DebugLaunch are normally only called by the debug manager component of the environment to manage the debug start command when in design mode to determine whether or not debug launch should be enabled. If enabled, when the F5 key is pressed the debug manager component of the environment calls DebugLaunch to initiate the debug process for each project in the list of startup projects.
If there is no startup project for the solution, the F5 key will be disabled.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.