What happens if you try to debug yourself ? I mean, does the process crash ? If it is possible, how would you implement it ?
I have tried launching x64dbg and I can't attach to my own x64dbg process.
Thank you!
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.
Sign up to join this communityWhat happens if you try to debug yourself ? I mean, does the process crash ? If it is possible, how would you implement it ?
I have tried launching x64dbg and I can't attach to my own x64dbg process.
Thank you!
Usually it’s not possible because one process must control the other and most debugging commands (e.g. reading or writing registers) need the target process to be stopped.
A common approach is run a copy of itself as a separate process (can be done on Unix systems using fork()) and debug that. In theory you could implement a custom debug-like functionality using signal or exception handlers or low level APIs but this is definitely something that would require a lot of work and unlikely to be very robust.