Topic: Debugging the engine line by line?

I'm banging my head against a wall trying to get the Maratis3D source to compile in Visual Studio 2010 so that I can debug the code line by line to see how it works. (The c++ source code, not assembly)

I'm not a very advanced programmer, and in order for me to use this awesome engine, I'm going to need to do a lot of debugging.

No project I open in VS2010 will compile. I tried using the premake files I found on the forum here to build a VS2010 project, which seems to be the closest I've got, but it needed a header like dinput.h or something, which isn't part of Visual Studio.

I'd prefer to do something like the manualuse demo, which extends mgame to create the actual game code. If anyone knows how to get a project like that to compile with debug, please let me know.

I'm open to trying other compilers if that would work better, but I'd like to continue using VS2010 as I'm familiar with it.

Scons does compile the code fine, but I don't know how to attach a debugger to it that would actually allow me to step through the source code, not the compiled code.

Re: Debugging the engine line by line?

I did a quick BING search, and found this:

http://social.msdn.microsoft.com/Forums … -directory

Seems you just need direct X SDK, though Im not sure that's the fix you're looking for.

GL!
hs

Re: Debugging the engine line by line?

I think I got that header name wrong. I looked it up at the time and it was something that came with the other open source compilers, but not Visual Studio.

I've tried so many things now I've lost track of what works and what doesn't.

When I try and convert from the manualuse VS2005 solution, it seems to only complain about a lack of bullet.lib, which isn't included with the 3rdparty library folders. I'm in the process of trying to create that library myself.

Like I said, I'm not a very advanced programmer, and I was hoping to learn a lot about libraries and the like from the maratis engine, which I guess I am, so that's a good thing I guess.

Re: Debugging the engine line by line?

Hi,
because it's hard to maintain multiple projects,
only the scons build system is up to date.

you can run scons from visual studio normally :
http://www.scons.org/wiki/IDEIntegration
http://www.mereidea.com/blog/2009/05/07 … al-studio/

and you can run scons in debug mode with this command :
python scons.py build_mode=debug

if you don't manage to create a visual project using scons,
you can always compile a debug executable using "python scons.py build_mode=debug"
and debug it in visual studio afterwards :

You can debug any executable by building a debug version of the code at the command line (for example, use scons -Q debug=true to build our example code). Open Visual Studio, and create a new, general, empty project. Choose to insert an existing project, and in the dialog select Executable files as the file type. Then browse to the executable you want to debug, and load it in. Set it as your start up project, and then you can either open a file containing the code you want to debug, place a breakpoint and start debugging (F5), or start at the beginning of the executable with Step Into from the Debug menu (or F11).

Re: Debugging the engine line by line?

Thanks Anael. This looks like exactly what I was looking for!