$cdb = "C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\cdb.exe" $script = "C:\Users\erikn\source\repos\acdream\tools\cdb-scripts\walk_run_motion_trace.cdb" $log = "C:\Users\erikn\source\repos\acdream\tools\cdb-scripts\walk_run_motion_trace.log" if (Test-Path $log) { Remove-Item $log } Write-Host "Attaching cdb to acclient.exe..." Write-Host "Once attached, do this in retail:" Write-Host " 1. Stand still 2s" Write-Host " 2. Hold shift+W (walk) 4s" Write-Host " 3. Release SHIFT only, keep W, 4s (this is what we want to capture)" Write-Host " 4. Release W" Write-Host " 5. Wait for cdb to detach (or Ctrl+C this PS to detach manually)" Write-Host "" & $cdb -pn acclient.exe -cf $script *>&1 | Tee-Object -FilePath "$log.console"