Home |
Previous Page | Next Page Debugging and Testing DataBlade Modules on Windows >
Debugging a DataBlade module is usually an iterative process,
repeated many times until the code is completely debugged. The "Creating
a Simple User-Define Routine" exercise in the DBDK InfoShelf
tutorial guides you through this process.
The debugging process on a local database server has the following
general steps:
- Open the project.dsw file in Visual C++.
You can do this in BladeSmith by clicking the MSDev button
on the Generate DataBlade dialog box or by choosing Tools > MSDev.
The DBDK Visual C++ Add-In toolbar should
be present in the Visual C++ program if you installed DBDK after
you installed Visual C++. If it is not present, you must add it
manually before you continue with the next step. See Manually Loading the Add-In for instructions.
- The DBDK Visual C++ Add-In prompts
you to configure the session for your new DataBlade project. Click Yes to
select a local server.
- Specify the project database server, database, and, optionally,
the SQL script to initialize your database.
See Specifying Properties for a Project for more information.
- Set appropriate breakpoints in one of the source code files.
See Setting Breakpoints for instructions.
- Open the appropriate unit test file in Visual C++ and edit it
to add appropriate SQL.
See Editing Unit Test Files for more information.
- Click the Debug DataBlade Module button.
- If you need to specify an executable file for the debugging
session, the Executable For Debug Session dialog box will prompt
you to do so. Use the browse button to select %INFORMIXDIR%\bin\oninit.exe.
- If a dialog box appears, warning that oninit.exe does
not have debugging information, click OK to
begin debugging.
The debugger runs until the first breakpoint.
- To resume debugging, choose Debug > Go from
the Visual C++ menu bar.
When you pass all breakpoints and all routines return, IfxQuery
displays the SQL results in your default
browser.
- If necessary, edit and compile the source code.
- Repeat the procedure, as necessary.
The following sections describe some of these steps.
Important:
If you attempt to start or stop the database server with
the Services dialog box of the Control Panel during debugging, you
receive an error. When the add-in starts the database server attached
to the debugger, the database server does not run as a Windows service. To
stop the database server, shut down the debugger.
Home |
[ Top of Page | Previous Page | Next Page | Contents |
Index ]