[Gdal-dev] Debugging in Visual C++ with nmake build

Dan Greve grevedan at hotmail.com
Wed Aug 10 16:25:39 EDT 2005


Brent,

Interesting technique.  Not sure how you figured that one out.  I added the 
line, and rebuilt but the executable, gdaltindex.exe, does not popup a 
dialog, nor is there any output. Am I missing something?

-- dan

>From: bfraser at geoanalytic.com
>To: "Dan Greve" <grevedan at hotmail.com>
>CC: gdal-dev at lists.maptools.org
>Subject: Re: [Gdal-dev] Debugging in Visual C++ with nmake build
>Date: Tue, 9 Aug 2005 19:11:24 -0600 (Mountain Daylight Time)
>
>Dan,
>
>   A trick I've used is to insert a
>      DebugBreak();
>statement in the C main I want to debug and compile gdal for debug using
>nmake -f makefile.vc.  When you run the app, a dialog will popup asking if
>you want to abort the application (or No to debug it).  If you answer No,
>the VC++ IDE will be invoked, showing the assembler code.  Click the
>"Single Step" icon twice in the IDE to advance to the source code, and
>dismiss the assembler window.  You can then step thru the source.
>
>Oh yeah, to be able to compile with the DebugBreak(); you need to do
>#include <windows.h>
>
>Sounds kinda complicated, but it's not too bad once you try it.  It's also
>a handy way of debugging a CGI app like Mapserver...
>
>Brent Fraser
>
>
>
> > Is this even possible?  I'm getting tired of maintaining a separate gdal
> > project to make the makefile.vc for the entire gdal tree.  Any visual 
>c++
> > experts? I'm using 6.0
> >
> > -- dan greve
> > -- melbourne fl
>
>





More information about the Gdal-dev mailing list