Source-Level Debugging
Source-level debugging can be an invaluable aid to finding problems in your code. It does require careful setup and building, however. First, you need to build and run a debug version (which requires special libraries). Next, you need to set your breakpoints. In the following sections, we describe how to do this.
Building a Debug Version
To build a debug version of
your conduit, select Set Active Configuration in
the Build menu. This specifies the debug rather than the release
version of the conduit. To complete the build of a debug version, you
also need to link with debug versions of the libraries. These
libraries end in d.lib (for example,
hotsyncd.lib is the debugging version of
hotsync.lib ). You can specify the debug
versions of your libraries in the Link panel of the Project Settings
dialog.
Running a Debug Version
To run a debug version of your conduit, you need to do a number of things:
Run a debug version of HotSync (hotsyncd.exe).
Debug versions of the DLLs need to be in the HotSync directory. A release version of HotSync won’t load a conduit built to run with debug. The 3.0 Conduit SDK ships with debug versions of HotSync and the DLLs. Copy them to the directory, where they can reside with the nondebug versions.
Run
CondCfg, so that the entry for your conduit points to the debug directory rather than the release directory. Use path\debug\MyConduit.DLLrather thanpath\release\MyConduit.DLL.In the Debug panel of the Project Settings dialog, specify ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access