Share via


IDebugProgramPublisher2::SetDebuggerPresent

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Tells the program publisher that a debugger is present and running.

Syntax

HRESULT SetDebuggerPresent(
   BOOL fDebuggerPresent
);
int SetDebuggerPresent(
   int fDebuggerPresent
);

Parameters

fDebuggerPresent
[in] Non-zero (TRUE) if a debugger is present, zero (FALSE) if it is not.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

The presence or absence of a debugger is reflected in the data returned from the GetProviderProcessData method: the value returned there is set or cleared by a prior call to the SetDebuggerPresent method.

See also