I am using the following macro codeto attach to the debugger:
process.Attach()
Works, fine,
but for some reasons it always attaches to the “Managed Code” (sort of default mode I guess)
Is there any way to specify that I want to attach to a “Native code” too?
You need to use the
Process2interface instead ofProcess. It has the Attach2 method which allows you to specify the types of engines you want to attach with.Documentation
Example: