Quick Tip: (remote) debugging the commerce engine

This is kind of an embarrassing story: I recently needed to (remote) debug a deployed commerce engine. What do you normally do when you need to debug a deployed website: you set your break-points, attach the debugger in Visual Studio to the w3wp process and wait until the breakpoint indicators turn red, indicating a successful attach of the debugger.

So I did, but for some reason my breakpoints would not turn red: they stayed disappointingly empty. I tried all kinds of different things like changing the access rights to the remote debugger, reinstalling the remote debugger, turning the firewall off and even installing Visual Studio on the machine I was trying to debug.

Finally, I said to a coworker I still couldn't debug the engine and I showed him what I did. He asked me why I was attaching to the w3wp process instead of connecting to the commerce engine executable. That was the moment when I felt quite stupid: of course I should have attached to the executable and not the the IIS process. What was I thinking off...

So just a quick reminder: when debugging the engine running "in" IIS, attach to the executable not to w3wp process.