ContinueDebugEvent function (debugapi.h)

Enables a debugger to continue a thread that previously reported a debugging event.

Syntax

BOOL ContinueDebugEvent(
  [in] DWORD dwProcessId,
  [in] DWORD dwThreadId,
  [in] DWORD dwContinueStatus
);

Parameters

[in] dwProcessId

The process identifier of the process to continue.

[in] dwThreadId

The thread identifier of the thread to continue. The combination of process identifier and thread identifier must identify a thread that has previously reported a debugging event.

[in] dwContinueStatus

The options to continue the thread that reported the debugging event.

Value Meaning
DBG_CONTINUE
0x00010002L
If the thread specified by the dwThreadId parameter previously reported an EXCEPTION_DEBUG_EVENT debugging event, the function stops all exception processing and continues the thread and the exception is marked as handled. For any other debugging event, this flag simply continues the thread.
DBG_EXCEPTION_NOT_HANDLED
0x80010001L
If the thread specified by dwThreadId previously reported an EXCEPTION_DEBUG_EVENT debugging event, the function continues exception processing. If this is a first-chance exception event, the search and dispatch logic of the structured exception handler is used; otherwise, the process is terminated. For any other debugging event, this flag simply continues the thread.
DBG_REPLY_LATER
0x40010001L
Supported in Windows 10, version 1507 or above, this flag causes dwThreadId to replay the existing breaking event after the target continues. By calling the SuspendThread API against dwThreadId, a debugger can resume other threads in the process and later return to the breaking.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

Only the thread that created dwProcessId with the CreateProcess function can call ContinueDebugEvent.

After the ContinueDebugEvent function succeeds, the specified thread continues. Depending on the debugging event previously reported by the thread, different actions occur. If the continued thread previously reported an EXIT_THREAD_DEBUG_EVENT debugging event, ContinueDebugEvent closes the handle the debugger has to the thread. If the continued thread previously reported an EXIT_PROCESS_DEBUG_EVENT debugging event, ContinueDebugEvent closes the handles the debugger has to the process and to the thread.

Examples

For an example, see Writing the Debugger's Main Loop.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header debugapi.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also

CreateProcess

Debugging Events

Debugging Functions