Compartir a través de


IDebugCoreServer3::EnableAutoAttach

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

Enables automatic attaching for the specified debug engines.

Syntax

HRESULT EnableAutoAttach(
   GUID*     rgguidSpecificEngines,
   DWORD     celtSpecificEngines,
   LPCOLESTR pszStartPageUrl,
   BSTR*     pbstrSessionId
);
int EnableAutoAttach(
   Guid[]     rgguidSpecificEngines,
   uint       celtSpecificEngines,
   string     pszStartPageUrl,
   out string pbstrSessionId
);

Parameters

rgguidSpecificEngines
[in] Array of GUIDs for each debug engine to mark as auto-attaching.

celtSpecificEngines
[in] The number of engines specified in rgguidSpecificEngines.

pszStartPageUrl
[in] The starting URL to use when auto-attaching.

pbstrSessionID
[out] ID of the session that was auto-attached.

Return Value

If successful, returns S_OK; otherwise returns error code. One error code is E_AUTO_ATTACH_NOT_REGISTERED, which indicates that the auto-attach class factory has not been registered.

Remarks

When a program associated with the specified URL is started, the specified debug engines are automatically started and attached.

See also