[gdal-dev] Debugging in Visual Studio 2019?

Joaquim Manuel Freire Luís jluis at ualg.pt
Thu Jun 29 07:20:25 PDT 2023


Second SS

From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> On Behalf Of Joaquim Manuel Freire Luís via gdal-dev
Sent: Thursday, June 29, 2023 3:15 PM
To: Abel Pau <a.pau at creaf.uab.cat>; gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] Debugging in Visual Studio 2019?


Debugging with VS is actually simple. You need:


  *   To build GDAL and your driver in debug mode
  *   Step 1, see Screenshot_1. Load one executable that has a code path into that of your driver (gdalinfo?)
  *   Step 2, see Screenshot_2. Right-click on Properties and give the full set of options to run the executable select in 2)
  *   Load the c/c++ codes and set breakpoints.
  *   Hit F5, etc... (here I'm assuming you know how to use the debugger)

NOTE. Screenshot_2 will be sent in a second message as the limit for the attach is so low that makes is very difficult to attach images-

Good luck

Joaquim


From: gdal-dev <gdal-dev-bounces at lists.osgeo.org<mailto:gdal-dev-bounces at lists.osgeo.org>> On Behalf Of Abel Pau
Sent: Thursday, June 29, 2023 2:15 PM
To: gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>
Subject: [gdal-dev] Debugging in Visual Studio 2019?

Não costuma receber e-mails de a.pau at creaf.uab.cat<mailto:a.pau at creaf.uab.cat>. Saiba por que motivo isto é importante<https://aka.ms/LearnAboutSenderIdentification>
Hi everyone,
I am a little stuck in something. Let's see if someone can help me.

I'm immersed in the creation of a new driver.
First step OK: download GDAL from GitHub, install some dependences, and use Cmake to create GDAL for Visual Studio. Big one project.
Second step OK: Add a new driver in ogr (using another project as inspiration) in this big project (adding some lines in CmakeLists etc..)
Third step: fill all functions to really make this driver work.
I'm stuck here. I want to debug in Visual Studio to complete the Third step but I don't know how. There is any way to debug something (in Visual Studio project I created using CMake) like a simple transformation "ogr2ogr layer.shp MiraMon_layer.pol ". I'm interested in debug inside the code to see if all is as I expect and this kind of things developers do... If not, then I supose I have to use testing
After having the project created I don't know how to debug it.
[cid:image001.png at 01D9AA9D.397E82C0]

Can anyone give me some clue? Thanks in advance!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230629/a0149969/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6831 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230629/a0149969/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot_2.png
Type: image/png
Size: 53098 bytes
Desc: Screenshot_2.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230629/a0149969/attachment-0003.png>


More information about the gdal-dev mailing list