Build with debug

Tamas Szekeres szekerest at GMAIL.COM
Mon Apr 30 04:44:12 EDT 2007


Johan,

You can execute the code step by step in the debugger if you compile
with the debug options.

1. Use /Zi instead of /Ox in OPTFLAGS
2. LDEBUG=/debug
3. DEBUG=/DDEBUG
4. Choose the debugger type as Mixed or Native in the Project Settings

Best regards,

Tamas



2007/4/30, Hallgren Johan E <jhhal at wmdata.com>:
> OK, thanks.
>
> My problem is that I need to understand what are going on in the MapServer source code sometime, and I can't debug it. Do you know if it's possible. My idea with the log was that I can add comments/messages in the source code and get a feeling on what are going on. But the best way would be to use the debugger and step the file as I am used to.
>
> /Johan
>
> ___________________________________
>
>
> Johan Hallgren
>
>
> WM-data a LogicaCMG company
> Pelle Bergs backe 3
> Box 1938, 791 19 Falun
> Tel: 023-547 46 (int: +46-2354746)
>
> Mobil: 070-588 44 28 (int: +46-705884428)
>
> johan.e.hallgren at wmdata.com
> http://www.wmdata.se
>
> -----Original Message-----
> From: UMN MapServer Developers List [mailto:MAPSERVER-DEV at LISTS.UMN.EDU] On Behalf Of Tamas Szekeres
> Sent: den 27 april 2007 17:09
> To: MAPSERVER-DEV at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-DEV] Build with debug
>
> Johan,
>
> As far as I can see the only way to support this requirement is to
> redirect the stderr output to the Windows debug console using the
> OutputDebugString API.
> Currently, Mapserver does not support this method. So if you find this
> feature useful you might submit a ticket on it. I think it's not so
> difficult to implement this kind of solution if needed.
>
> Best regards,
>
> Tamas
>
>
>
> 2007/4/27, Hallgren Johan E <jhhal at wmdata.com>:
> >
> >
> >
> >
> >
> > Hello Tamas
> >
> > These are the settins I use, do you mean that this it should be correct? I
> > have DEBUG ON on both root tag and on the specifc layer. Could the output be
> > somewhere where I dont't see it? I use Mapscript in Visual studio, and I
> > expected to see the ouput at the Debug/output window.
> >
> > *******************************************************
> >
> > # Optimized, with using MSVCRT.
> >
> >
> > OPTFLAGS = /nologo /Ox /MD $(WARNING_LEVEL) $(DEBUG) /EHsc
> >
> > # Uncomment the following to link mapserv.exe with a dll. In almost
> >
> > # all cases you will want to do this.
> >
> > DLLBUILD = 1
> >
> > # Set the Warning level for the compiler (defaults to W1)
> >
> > WARNING_LEVEL=/W3
> >
> > #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > # Debugging Options
> >
> > #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > ENABLE_STDERR_DEBUG=-DENABLE_STDERR_DEBUG
> >
> > # Set the linker debug option
> >
> > # LDEBUG=/debug
> >
> > # DEBUG Build flags
> >
> > # Set the DEBUG flag if you wish to make a debug build
> >
> > # DEBUG=/DDEBUG
> > *******************************************************
> > Johan
> > ___________________________________
> >
> >
> >
> > Johan Hallgren
> >
> > WM-data
> > Pelle Bergs backe 3
> > Box 1938, 791 19 Falun
> >
> > Tel (och mobil): 023-547 46 (int: +46-2354746)johan.e.hallgren at wmdata.com
> > http://www.wmdata.se
> >
> >  ________________________________
> >  Från: Tamas Szekeres [mailto:szekerest at gmail.com]
> > Skickat: to 2007-04-26 19:21
> > Till: Hallgren Johan E
> > Kopia: MAPSERVER-DEV at lists.umn.edu
> > Ämne: Re: Build with debug
> >
> >
> >
> >
> > Johan,
> >
> > You might have to compile with ENABLE_STDERR_DEBUG and use "DEBUG ON"
> > in your map configuration.
> > Verbose output is generated and sent to the standard error output (STDERR).
> >
> > Best regards,
> >
> > Tamas
> >
> >
> > 2007/4/26, Hallgren Johan E <jhhal at wmdata.com>:
> > >
> > >
> > >
> > >
> > > Hello
> > >
> > >
> > >
> > > I tries to build MapServer so I can see msDebug()-output. I expect to see
> > > the output in the VS-output window, or in the console running the program
> > > but I don't. Do I have to change some compiler directives that I have
> > > missed?
> > >
> > >
> > >
> > > /Johan
> > >
> > >
> > > ___________________________________
> > > Johan Hallgren
> > >
> > >
> > >
> > >
> > >
> > > WM-data a LogicaCMG company
> > >
> > >
> > > Pelle Bergs backe 3
> > >
> > >
> > > Box 1938, 791 19 Falun
> > >
> > >
> > >
> > > Tel: 023-547 46 (int: +46-2354746)
> > >
> > > Mobil: 070-588 44 28 (int: +46-705884428)
> > >
> > >
> > > johan.e.hallgren at wmdata.com
> > >
> > >
> > > http://www.wmdata.se
> > >
> > >
> >
>



More information about the mapserver-dev mailing list