Page:
DebuggingMapnik
Pages
A perfect testcase
API changes between v2.0 and v2.1
API changes between v3.0 and v3.1
AWS Lambda
About Mapnik
AlsoFilter
Api changes between v2.1 and v2.2
Api changes between v2.2 and v2.3
Api changes between v2.3 and v3.0
ArchInstallation
Aspect Fix Mode
Benchmark Notes
BoundsClipping
BrokenExceptions
BuildingSymbolizer
CSV Plugin
CairoVersions
CentOS_RHEL
ChangeLog
Code sprint
CodingStandards
Compiler Notes
Compositing
Contributing
DebianInstallation
DebugSymbolizer
DebuggingMapnik
DemoGallery
DeveloperTopics
DevelopingPlugins
Development
ElseFilter
ExampleCode
Expression
FasterCompiling
Fasterlabeling
Filter
FontSet
FreeBSDInstallation
GDAL
GEOS
GSOC Ideas
GSOC2010
GSOC2010_Application
GSOC2010_Ideas
GSOC2011
GSOC2011_Ideas
GeoJSON Plugin
GettingStarted
GettingStartedInPython
GettingStartedInXML
GlyphSymbolizer
GroupSymbolizer
Grouped rendering
Gsoc2012 application
Gsoc2012
HaitiStyles
Home
Ideas
Ideas_Compositing
Ideas_FutureMapnik
Image IO
InstallationTroubleshooting
InternationalText
IntroductionToGIS
Kismet
LabelingSupport
Layer
LearningMapnik
Legending
LinePatternSymbolizer
LineSymbolizer
LinuxInstallation
Logging
MacInstallation
MacInstallationSource
MacInstallation_Homebrew
MacPostGIS_Setup
MacPythonUpgradeIssues
ManagingLargeXmlFiles
MapDesign
Mapnik Development
Mapnik Installation
Mapnik with wxPython
Mapnik2
Mapnik2_Changes
MapnikCodeSprint
MapnikCodeSprint_MCS01
MapnikCodeSprint_MCS01_Location
MapnikCodeSprint_MCS01_Results
MapnikCodeSprint_MCS01_Schedule
MapnikCodeSprint_MCS02
MapnikCoreConcepts
MapnikDependencies
MapnikInstallationSvn
MapnikReferences
MapnikReleaseSteps
MapnikReleases
MapnikRenderers
MapnikTutorials
MapnikUtilities
MapnikViewer
Mapnikinstallation
MarkersSymbolizer
MaxScaleDenominator
MemoryDatasource
MetaWriter
MinScaleDenominator
ModServer
Nik2Img
Notes and caveats
OCCI
OGR
OpenSolarisInstallation
OpenSolarisInstallation_32bit
OpenSolarisInstallation_64bit
OpenSolarisInstallation_TroubleShooting
OpenSuse
OpenSuseInstallation
OptimizeRenderingWithPostGIS
OsmPlugin
OutputFormats
PackageBuilding
Paleoserver
Path Expression
PgRaster
PluginArchitecture
PointSymbolizer
PolygonPatternSymbolizer
PolygonSymbolizer
PostGIS
Postgis async
Python Plugin
Python3k
RFC: Raster color interpretation
Raster
RasterColorizer
RasterSymbolizer
Rasterlite
Related projects and utilities
Release0.6.0
Release0.6.1
Release0.7.0
Release0.7.1
Release0.7.2
Release2.0.0
Release2.0.1
Release2.0.2
Release2.1.0
Release2.2.0
Runtime Logging
SQLite
SVG support
Scale factor
ScaleAndPpi
ShapeFile
ShieldSymbolizer
ShieldSymbolizerTests
Style
StyleShare
Svg rendering gochas
SymbologySupport
Text Rendering Overview
TextSymbolizer
Trac to Github wiki migration notes
Troubleshooting
UbuntuInstallation
UbuntuInstallationOld
UsingCustomFonts
UsingScons
WindowsInstallation
World population tutorial
XMLConfigReference
XmlFormatDiscussion
iOS
mapnik.Datasource
mapnik.Layer
mapnik.Map
my choice
No results
4
DebuggingMapnik
Dane Springmeyer edited this page 2013-01-23 14:10:01 -08:00
Table of Contents
This page exists to discuss the best way for developers to debug Mapnik.
Currently I have these questions:
- What's the best way to get a Python build with debugging symbols? Will adding -g suffice? Is --with-pydebug needed?
- Do we need to compile the Boost libraries with debugging symbols as well?
- Is anything different for FreeBSD?
Eclipse
Here I try to describe my setup. I'm sure there are better ways but this works for me:
- Checkout the latest code:
git clone git://github.com/mapnik/mapnik.git mapnik_trunk
This has the advantages that
- you always have the newest version (
git pull
) - you can quickly add test code and remove it again (
svn checkout .
) - you can easily create patches (
git diff
) - Compile it as described in the INSTALL file provided in the root directory of the checkout. I have the following variables in my
config.py
:
DEBUG = True
XML_DEBUG = True
INPUT_PLUGINS = 'gdal,ogr,osm,postgis,raster,shape,sqlite'
PREFIX = '/home/philipp/usr'
PYTHON_PREFIX = '/home/philipp/usr'
BOOST_INCLUDES = '/usr/include'
BOOST_LIBS = '/usr/lib'
BINDINGS = 'all'
DEMO = True
- Download and install the Eclipse IDE for C/C++ Developers (79 MB)
- Create a new Makefile-C++-Project using the existing
mapnik_trunk
path where you have checked out the working copy. - Create a debug configuration e.g. specifying the c++ demo application
rundemo
indemo/c++
. - You can got through the program now step by step and make breakpoints. In the default behavior, Eclipse tries (and fails) to compile the project itself and ask to start anyway. Just say yes.
- If you change a file, recompile the project from the command line by just typing
python scons/scons.py
. - It is possible (but not necessary) to fine-tune Eclipse so that it does not try to build the project by itself and that is uses scons to do successfully do so.