Jump to content

Debugging NetMessages


Recommended Posts

Hello, I am interested in what goes into a Simulation Command Message but am having difficulties debugging.

I am using Visual Studio 2012 on Windows with the vc2012 build of the most recent commit. When I try to debug NetMessage.cpp with a breakpoint in CNetMessageFactory::CreateMessage and step through where pNewMessage gets initialized, I cannot see pNewMessage. pNewMessage does not show up in autos, locals, or when I put a watch on it. Is there a way to see the message being constructed?

Link to comment
Share on other sites

It might help to use a debug build, which will disable optimizations and give you a better chance of finding the variable you want. That's still hit or miss though, so a good fallback is to use some form of logging. Just general advice, not really even specific to 0 A.D. :) More about debugging in the context of 0 A.D. which may or may not be helpful http://trac.wildfiregames.com/wiki/Debugging

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...