[Proposal] attachProcess need an initial break
The following pseudocode works well before 0.3.3.0. But it will hang in the method pykd.attachProcess
since 0.3.3.0.
pykd.initialize()
pykd.attachProcess(pid)
# do some work such as executing pykd.dbgCommand(cmd)
pykd.detachProcess(pid)
The issue can be fixed by adding the initial break in the function attachProcess in dbgeng.cpp as below
ULONG opt;
hres = g_dbgMgr->control->GetEngineOptions(&opt);
if (FAILED(hres))
throw DbgEngException(L"IDebugControl::GetEngineOptions", hres);
opt |= DEBUG_ENGOPT_INITIAL_BREAK;
hres = g_dbgMgr->control->SetEngineOptions(opt);
if (FAILED(hres))
throw DbgEngException(L"IDebugControl::SetEngineOptions", hres);