I know I can start a process in code with Process.Start(). Is it also possible to attach the debugger to that process?
Process.Start()
Not from code per se , but just a way to do it?
You can attach to a running process using Tools | Attach to Process. If it's a Web Application, you can attach to it by attaching to aspnet_wp.exe or w3wp.exe.
Tools | Attach to Process
aspnet_wp.exe
w3wp.exe
To answer your question on how to attach to a process programmatically:
Here are other Stack Overflow questions that deal with that:
2.1m questions
2.1m answers
60 comments
57.0k users