Debugging Plug-Ins - File Maker

Feel free to skip this section if you never make mistakes when you write source code. For everyone else, CodeWarrior’s symbolic debugger works quite well with DLLs, code resources, and other forms of “hosted code libraries.” You’re going to be on your own when it comes to the actual debugging process, but in the next few pages you’ll learn the steps required to prepare your project for debugging within the CodeWarrior symbolic debugger. Visual Studio users should refer to that IDE’s documentation if you’re unfamiliar with the steps required for debugging a DLL.

Configuring the Project
Before you change the project settings, you would normally create a new target within the CodeWarrior project. In the template you are using there are special debug targets already defined for you. Take a quick look at the target settings that differentiate the debug targets from the release targets. Select Project > Set Default Target and choose the Debug target that matches your current environment. Then open the target settings by selecting Edit > TargetName Settings and switch to the Global Optimizations panel:

Configuring the Project

Note that all the controls are on the left to make debugging as easy as possible. Now switch to the linker settings panel and notice the SYM file or CV info generation is turned on, like so:

Debugging Plug-Ins

These options make it possible for the debugger to match individual parts of the compiled code to your source. When debugging, you can then step through your C/C++ source code instead of seeing low-level assembly language.

There are some more options you may find useful for debugging, such as remote debugging, but those are for you to investigate. Consult your IDE manuals for detailed information on debugging. Now you should configure the predefined debug target so that you can start debugging your plug-in. In the Runtime Settings panel (select Runtime Settings under the list of settings panels), you have to tell CodeWarrior which application should be launched to execute your plug-in. Click the Choose button and navigate to the FileMaker Pro application like this:

Debugging Plug-Ins

Then switch to the Target Settings panel (the first settings panel in the list) and change the Output Directory to your FileMaker Extensions folder (on Macintosh) or your FileMaker Pro System folder (on Windows). Here’s the Target Settings dialog:

Debugging Plug-Ins

Make the preceding changes permanent by clicking the Save button. All that remains to do now is to turn on the debugger for this target. Select Project > Enable Debugger from the menu.

Using the Debugger
You are now ready to use this predefined Debug target during the development phase of your work. Each time you select Project > Debug from the menu, CodeWarrior will bring your project up to date and output the plug-in file to FileMaker Pro’s extensions directory, then launch FileMaker Pro for you.

Wherever you set a breakpoint in your source code files is where the CodeWarrior debugger will stop when the plug-in’s code is executed.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

File Maker Topics