Home > Software engineering >  Unable to attach to process. General Exception
Unable to attach to process. General Exception

Time:09-27

This is from Visual Studio Community 2022 64-bit 17.1.1, "Current."

The binary to be debugged was compiled on Windows 11 with the same IDE, but I'm running it on Windows 10 Pro. Once it starts, I'm trying to attach the debugger.

The same file system contains all exe, lib, dll, obj, and source, all in the same places and full paths, as it's mounted in the same position on both computers (T:).

Attachment type is "Automatic." I'm doing Debug->Attach to Process, and clicking on a PID.

The same workflow succeeds on connecting the debugger on the same IDE on the Windows 11 box where the exe was compiled.

All processes belong to the same user (me).

Googling is finding nothing at all except red herrings about remote debugging (I'm trying to debug on the computer running the binary) and permissions.

CodePudding user response:

OK, I'm not sure if this answer will help others, but on Windows 11, when I select the binary in question, the "Attach to:" menu comes up as "Native Code" automatically. On Windows 10, the same Visual C release, attaching to the exact same binary, for some reason is detecting it as Python. Manually setting the Code Type to "Debug these code types:"-->Native allowed the debugger to attach correctly.

  • Related