debug_r = svcDebugActiveProcess(&kdbg, 0x11); debug_r2 = svcDebugActiveProcess(&kdbg2, 0x12); if ( R_FAILED(debug_r) || R_FAILED(debug_r2) ) { printf("Debug attempt failed!\n"); pause_X(); } else { printf("Debug started!\n"); } DebugEventInfo info; DebugEventInfo info2; svcGetProcessDebugEvent(&info, kdbg); svcGetProcessDebugEvent(&info2, kdbg2); if ((info.type == DBG_EVENT_EXCEPTION && info.exception.type == EXC_EVENT_ATTACH_BREAK) || (info2.type == DBG_EVENT_EXCEPTION && info2.exception.type == EXC_EVENT_ATTACH_BREAK)) break; svcContinueDebugEvent(kdbg, BIT(DBG_EVENT_EXCEPTION) | BIT(DBG_EVENT_CREATE_THREAD)); svcContinueDebugEvent(kdbg2, BIT(DBG_EVENT_EXCEPTION) | BIT(DBG_EVENT_CREATE_THREAD)); printf("Time to dump RAM!\n");