There will be times when your plugin will not perform correctly. In these cases you may need to debug the plugin to see what is happening behind the scenes. To do so with Codewarrior open the Target Settings Panel and go to Runtime Settings. Here you want to select the copy of 4D you are currently using to run your database. Click on the Choose button and then navigate to locate your copy of 4D. Once you have done this go to the Project menu and choose "Enable Debugger". This will cause an extra column to appear on the far left of all source code files. In this column is where you would set a breakpoint. A breakpoint will cause the currently executing code to stop. This is very similar to how breakpoints in 4D work. To set a breakpoint simply click in the left hand column and a red dot will appear in the column. This would be similar to the red dot, which appears below in the "Source pane" of the Debugger window. To run the database you want to choose "Debug" from the Project menu. This will launch 4D. Simply run your code and when a breakpoint in your plugin is reached the Debugger window will appear similar to the example below.
Inside the Codewarrior debugger you can view the current flow of code along with the current values of all the variables in the "Variables pane" in the upper right corner of the dialog. To learn more about the Codewarrior Debugger take a look at the "IDE User's Guide" on page 409.