While attempting to attach the IDA Pro debugger to a 64-bit target process on Windows (e.g., using the Local Windows Debugger or Windbg backend), you may encounter this error dialog:
“The debugger could not attach to the selected process. This can perhaps indicate the process was just terminated, or that you don’t have the necessary privileges.”
Even when running ida64.exe as Administrator with full High Mandatory Integrity tokens, Windows access control restrictions, process isolation (PPL/Protected Process Light), or SeDebugPrivilege token handling can prevent IDA’s GUI from attaching directly.
The Fix: Decouple via Local Remote Debugging Server
The most reliable solution is to decouple the IDA GUI from process attachment by using IDA’s standalone 64-bit remote debugging stub:
-
Locate the Debugger Server Directory: Navigate to the
dbgsrvsubfolder inside your IDA installation directory:C:\Program Files\IDA Pro\dbgsrv\ -
Launch the 64-bit Debug Server as Administrator: Right-click
win64_remotex64.exeand select Run as Administrator (or run from an elevated cmd prompt):win64_remotex64.exe -i127.0.0.1The server listens on
localhost:23946. -
Configure IDA Pro to Attach via Remote Windows Debugger:
- In IDA Pro, go to Debugger → Switch Debugger → Remote Windows debugger.
- Navigate to Debugger → Process Options.
- Set Hostname to
127.0.0.1and Port to23946. - Go to Debugger → Attach to Process… and select your target binary.
By attaching through the elevated win64_remotex64.exe daemon, the remote server acquires the requisite process handles cleanly, bypassing the local UI attach restrictions.