Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging EXCHANGE transport agent in VS2010 c#

I was given the source to a transport agent that parses incoming email that meet a certain criteria. I need to make some modifications but I need to track variables and my debugging attempts have been unsuccessful.

I build the dll, install it in exchange, set a break point then attach to the relevant process but nothing appears to be happening. I am not experienced in this method of debugging and I'm pretty sure that i'm missing a step, but all the documentation i'm able to find basically has the process listed as those few steps. Any assistance?

like image 396
Omar J Avatar asked Jan 09 '12 09:01

Omar J


1 Answers

Figured it out

For anyone in the same situation, you need to do is this:

  1. Compile your project in Debug mode.
  2. Deploy it to exchange however you do that.
  3. Since it is a DLL and running through exchange, exchange will be the host process so you'll have to attach a debugging to the exchange process for debugging. You can do that but going to the Debug menu in VS and selecting "Attach to process", select the process that will be running the DLL.
  4. When VS attaches to the process just set breakpoints in your code and you should be good to go.
like image 58
Omar J Avatar answered Sep 30 '22 15:09

Omar J