Jump to content

DBG_C_Detach

From EDM2
Revision as of 01:10, 16 May 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:DBG_C_Detach}} Debug Detach Command. Detach from a Process under Debug Command. ;Parameters * '''Pid''' Process of ID of debuggee * '''Cmd''' DBG_C_Detach ;Returns This command detaches from the debuggee connection. It is the last command issued before resuming the process. The only DosDebug notifications that are returned by this command are DBG_N_Success and DBG_N_Error. ;Restrictions Detach only works on a debuggee process currently under de...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Debug Detach Command. Detach from a Process under Debug Command.

Parameters
  • Pid Process of ID of debuggee
  • Cmd DBG_C_Detach
Returns

This command detaches from the debuggee connection. It is the last command issued before resuming the process.

The only DosDebug notifications that are returned by this command are DBG_N_Success and DBG_N_Error.

Restrictions

Detach only works on a debuggee process currently under debug using the attach command, DBG_C_Attach. You cannot use DBG_C_Detach if you used DBG_C_Connect. DBG_C_Attach and DBG_C_Detach are paired and are used for debugging a process that is already running.

Remarks

By using this function, a debugger can only remove debug context of a given debuggee process as stated above. If the debugger needs to detach and have the debuggee terminate, it is necessary to use DBG_C_Term command instead of DBG_C_Detach. This will terminate the debuggee process and remove attach information.