Page 1 of 1

[solved] How to debug Freeorion using msvc?

Posted: Mon May 22, 2017 7:56 pm
by Ophiuchus
Hi,

I'm trying to unify the calculation of current production and future production (see http://www.freeorion.org/forum/viewtopi ... 660#p87660).

For that i tried to write an implementation using boost coroutine2. But that crashes and i don't have a clue how to debug/find out what goes wrong.

https://github.com/agrrr3/freeorion/tre ... coroutine2

how would you approach that? how do you start freeorion with a debugger from msvc?

any help greatly appreciated thanks :)

Re: How to debug Freeorion using msvc?

Posted: Mon May 22, 2017 8:21 pm
by Geoff the Medio
Ophiuchus wrote:how would you approach that? how do you start freeorion with a debugger from msvc?
It can run a program with the debugger already attached, but it's easier to run "freeorion" from a cmd.exe window and then attach the debugger to the running process using the GUI. Set a breakpoint, step through execution, look at the call stack, etc. Local and auto variable values are unreliable, though.

Re: How to debug Freeorion using msvc?

Posted: Tue May 23, 2017 10:25 am
by Ophiuchus
Geoff the Medio wrote:
Ophiuchus wrote:how would you approach that? how do you start freeorion with a debugger from msvc?
It can run a program with the debugger already attached, but it's easier to run "freeorion" from a cmd.exe window and then attach the debugger to the running process using the GUI. Set a breakpoint, step through execution, look at the call stack, etc. Local and auto variable values are unreliable, though.
Thanks, attaching to a running freeoriond works fine :)