Launching an application for debugging, Debugging webscript, Debugging java – Apple WebObjects 3.5 User Manual
Page 57

57
In the previous chapters, you learned the pieces of a WebObjects
application and the kinds of methods you need to write. Once you’ve put
together an application, you should debug it to make sure it runs properly.
The techniques you use to debug vary according to the languages you’ve
used to write the application.
This chapter describes how to debug WebScript code, Java code, and
Objective-C code in a WebObjects application. When you debug, you’ll be
using the Project Builder application. To learn how to use Project Builder,
see the online book WebObjects Tools and Techniques.
Before you debug, it’s a good idea to test your installation and verify that it
works properly. If you haven’t already done so, follow the instructions in the
online document Post-Installation Information.
Launching an Application for Debugging
You debug WebObjects applications using Project Builder, as described in
the online book WebObjects Tools and Techniques. The executable you launch
differs based on which language you used to write the application. This
section tells you how to begin a debugging session for WebObjects
applications written in each of the three available languages: WebScript,
Java, and Objective-C.
Debugging WebScript
To debug WebScript code, you rely on log messages and trace statements
described in the section “Debugging Techniques” (page 58).
If you’ve written an application entirely in WebScript, you typically debug
it by running NeXT_ROOT
/NextLibrary/Executables/WODefaultApp
from the Project
Builder launch panel, as described in WebObjects Tools and Techniques. When
you do, the output from the debugging and trace statements is displayed in
the launch panel.
Debugging Java
The debugging strategy for Java applications is very similar to the strategy
for debugging WebScript applications. Because the WebObjects Java
bridge is incompatible with
jdb
, no Java debugger is supported for
WebObjects. Instead, you can use the methods described in the section
“Debugging Techniques” (page 58) as well as
System.out.println
statements.
Build the executable for your project using Project Builder, then launch that