Visual Studio shows a warning, trying to attach to a different user's process:
Searching for an explanation, I've found the MSDN article, claiming that:
An untrusted process that contains malicious code has the potential to damage the computer doing the debugging.
To my knowledge, it's quite the opposite - you actually can attach a process with a debugger in order to prevent its (presumably malicious) behavior. Assuming a malicious code is already running in my system, how attaching with a debugger to it can compromise the system's security even more?