Debug NMDC!

In a previous post, I talked about how you enable ADC debug messages (and allows them to basically flood you in a busy hub). Since there aren’t many ADC hubs around and you might have found a problem in NMDC hubs, that option won’t do you any good. Unfortunately, there is no “easy” option to do in NMDC hubs, like the ADC option.

However, there is something you can do. First, compile DC++ in Debug mode. Then open up NmdcHub.cpp and locate the function “NmdcHub::onLine(const string& aLine)”. In it, place the line “dcdebug(“Debug line: “, aLine.c_str());” in the beginning. This way, you will display every line that is sent to you, in raw NMDC. And of course when you then run DC++ in debug mode, look in Visual Studio for the output.

The beauty of this is that you aren’t confined in NmdcHub.cpp or AdcHub.cpp. You can use this anywhere you want in the DC++ source. (Look for the #define to see how it’s implemented.) Just replace “aLine” with the appropriate line you want to see debugged.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: