What is the difference between starting debugging and joining a process

My project loads much faster when I attach it to the IIS w3wp.exe workflow than when I start debugging.

However, the same workflow processes the same number of modules / DLL (w3wp.exe), regardless of whether I run Debugging or Attach to Process.

Why is process binding so much faster?

+4
source share
2 answers

“Start debugging” starts a new instance of the executable file with a debugger attached from the very beginning, so the overhead for all necessary debugging calls is due to the launch, while “Attach to Process” joins the already running process, so until then your process worked without additional overhead caused by debugging.

+3
source

Code without debugging is much faster. When you attach a process, the application is already running, the pool is running, so you do not perform some heavy operations in debug mode, for example, the Application_OnStart event and some others.

0
source

All Articles