for setting such a preprocessor variable like _DEBUG, check your compiler's manual. for gcc it's -D, for MSVS, just go to the property page of your project and then compiler ...
outputting debug messages to the console is normally possible, but not during receiving messages, since you'd produce a new message and HL doesnt really like "recursive" messages
pfnMsgBegin is some nice function and there are different approaches to variable length message handling. I guess you just have to do some more experimenting. one day isnt much

and this message you are talking about is one which has multible recipients, I think. Therefore the handling is a bit different. take a close look at it with debug_engine like pierre suggested and it should be fine