how can i debug cafu ?

Get help with installing and running the Cafu Engine here. This forum is also for general questions and discussion of all aspects regarding the Cafu Engine.
Post Reply
zengqh
Posts: 6
Joined: 2012-08-10, 11:06

how can i debug cafu ?

Post by zengqh » 2012-08-22, 17:47

thanks for the 611 source release.
is there any way to debug the cafu engine ?

i want to see how the code works, i was used to debug with visual studio...

it will be grateful for any suggestion!
zengqh
Posts: 6
Joined: 2012-08-10, 11:06

Re: how can i debug cafu ?

Post by zengqh » 2012-08-23, 04:59


User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: how can i debug cafu ?

Post by Carsten » 2012-08-23, 10:09

Hi zengqh,
zengqh wrote:i have just found that the scons can be converted to visual studio project.
Can you please tell how you did this?

I never use Visual Studio other than from the command line or via SCons, but I'd be interested in how this works as well.

About debugging, you should also be able to do this with the executables generated directly by SCons as well: Just open the .exe binary in your favorite debugger. (I use WinDbg under Windows, which also works very well as a just-in-time debugger.)
Best regards,
Carsten
zengqh
Posts: 6
Joined: 2012-08-10, 11:06

Re: how can i debug cafu ?

Post by zengqh » 2012-08-23, 12:03

http://www.scons.org/wiki/IDEIntegratio ... 22cd161bf4

after i try the below, i found that
it just can compile it in visual studio, but it can't debug... :shock:

thanks, i will try windbg.
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: how can i debug cafu ?

Post by Carsten » 2012-08-24, 23:35

Thanks!
i found that
it just can compile it in visual studio, but it can't debug... :shock:
As I said above, I have no first hand experience with Visual Studio, but I'm still surprised. I would expect that you can open any executable with the VS debugger that comes with the proper debug symbols (the Cafu debug builds do).

That is, I was thinking that the VS debugger is, in this regard, similar to WinDbg and any other debugger, and that you can use it also when the project was not strictly build with the VS IDE... but alas, I'm speculating here.
Best regards,
Carsten
User avatar
deamonpog
Posts: 10
Joined: 2013-04-03, 14:55
Location: Sri Lanka

Re: how can i debug cafu ?

Post by deamonpog » 2013-07-13, 06:03

Carsten wrote:Hi zengqh,
zengqh wrote:i have just found that the scons can be converted to visual studio project.
Can you please tell how you did this?

I never use Visual Studio other than from the command line or via SCons, but I'd be interested in how this works as well.

About debugging, you should also be able to do this with the executables generated directly by SCons as well: Just open the .exe binary in your favorite debugger. (I use WinDbg under Windows, which also works very well as a just-in-time debugger.)
I just tried WinDbg, it always say
ERROR: Symbol file could not be found.
any help?
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: how can i debug cafu ?

Post by Carsten » 2013-07-13, 21:33

Hi deamonpog,
deamonpog wrote: I just tried WinDbg, it always say
ERROR: Symbol file could not be found.
any help?
I don't feel particularly qualified to give advice about WinDbg, because there is much of it that I don't understand well enough myself. (So if in doubt, you may want to refer to WinDbg-specific resources, or user groups etc.)

That said, I don't think that this error is fatal, as the missing symbol file is probably referring to Windows libraries that (as application developers) we normally don't need to debug into anyway.

You should, despite the error, be able to see debug information such as function and variable names when you use WinDbg for debugging Cafu (in debug build), using it either as just-in-time debugger, or when you open or attach to the Cafu.exe executable via the menu. :up:
Best regards,
Carsten
User avatar
deamonpog
Posts: 10
Joined: 2013-04-03, 14:55
Location: Sri Lanka

Re: how can i debug cafu ?

Post by deamonpog » 2013-07-13, 21:58

Ah maybe that is the case. Thanks. Anyway i found that its easier to use VS 2010 than WinDbg for me since i am used to it.
I used that "Makefile Project" template when creating the project as suggested in http://www.scons.org/wiki/IDEIntegratio ... Windows.29 and gave the Cafu.exe as the output file in project settings so that Debug->Start Debugging (Shortcut : F5) will start debugging.
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: how can i debug cafu ?

Post by Carsten » 2013-07-15, 14:28

deamonpog wrote:I used that "Makefile Project" template when creating the project as suggested in http://www.scons.org/wiki/IDEIntegratio ... Windows.29 and gave the Cafu.exe as the output file in project settings so that Debug->Start Debugging (Shortcut : F5) will start debugging.
It's good to hear that this works, thanks for sharing it! :up:
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests