Overview: Debugging an application

 

In this topic ...

Designer Task View Messages

Application Server Console Messages

Related Topics ...

How do I...Debug an Application

How to Use the Debug Tracing Builder

There are several ways to determine the cause of problems occurring in a web application. We can use:

  • Debug Tracing - To track down bugs in a model or application. The Debug Tracing Builder allows you to trace variables and actions. This builder writes trace information to a log file allowing you review the logged trace output after you have run a model.

By default this log file is named debugTracing.txt and it is located at: <web_app_directory>\<project_name>\WEB-INF\logs\debugTracing.txt

See How do I...Debug an Application for details on using debug tracing techniques.

  • Designer Task View - To review errors and warnings that result from a Builder's generation code

  • Application Server Console - To view various execution errors and messages

 

Designer Task View Error Messages

Errors and warnings that result from a builder's generation code are sent to the IDE's Tasks view. These errors include syntax or other errors in your Java code (for example, in the Method builder). By default, the Tasks view is included in the Factory Models perspective. To add it to the current perspective, click Window | Show View | Other > Basic | Tasks.

For each problem logged in the Tasks view, an icon in the first column indicates the severity of the problem:

Tasks view Error iconindicates an Error. Examples of errors are invalid values for builder call inputs and Java coding errors.

Tasks view Warning iconindicates a Warning.

The displayed information in the other Tasks columns include:

  • Description: A description of the problem. If the description is too long to fit in the column, right-click on the problem entry in the Tasks view and choose Properties.

  • Resource: Name of the model in which the problem occurred.

  • In Folder: Pathname of the model's directory.

  • Location: Name and type of builder in which the error occurred. If this column is blank, the problem is generic to the model, for example, syntax errors in Java code.

If the problem occurred in a specific builder call, clicking on the Tasks entry will open that builder call in the Builder Call Editor. To get more information on the error, right-click on the error in the Tasks view and choose Properties.

If the error occurred during model generation, clicking on the Tasks entry will open a Generation Errors dialog that gives an explanation of what caused the generation error. When this type of error occurs, no builder is opened in the Builder Call Editor.

 

Application Server Console Messages

Some error messages during a model's execution get written to the application server's console (command) window. We can check the application server's command window for any "System.out.println()" statements you have included in any of your methods as well.