C#: Howto debug a multiple-component server application?
Question:
I've written a nHibernate API for a C# mailserver. The mailserver you can find here if you're interested: http://www.lumisoft.ee/lswww/download/downloads/MailServer/
And my (buggy) API here: http://www.lumisoft.ee/Forum/default.aspx?g=posts&t=722
The thing is, the mailserver consists of several components:
net dll: all the lowlevel protocol stuff MailServer exe: the mailserver itself DB_API dll: the mailserver database plugin-API Manager: the mailserver configuration manager Now, my API works fine (meaning it doesn't crash, but not necessarely returning the correct results) in the console application where I tested it. But when I plug it (nhibernate DB_API dll) into the server and use the Mailserver manager to just adjust the configuration settings somehow, I get null reference exceptions. Now I need to debug the server by step thro开发者_StackOverflowugh to see where exactly the error occurs. Now, because it consists of multiple components (separate projects), I can't just use step through in visual studio... How do I debug this? I assume I need to attach the debugger to the process, but then?You can set Visual Studio to start debugging multiple Projects at once. Just right-click on the solution in the project browser and bring up the preferences. There you can find an entry called Startup Items or something similar. I use it all the time when debugging client-server setups, works like a charm.
精彩评论