Debugging Generated Applications

From Skyway Wiki

Jump to: navigation, search

Contents

Introduction

Debugging a generated skyway application isn't much different that debugging other applications. You have several tools and techniques at your disposal. Like any application that isn't behaving as expected, you have to find the problem before you can attemp to solve it. All of the tools and techniques on this page can be used to zero in on the problem in your application.


Check the Server Console

The first thing you should to to diagnose a runtime problem is to take a look at the server console to see if there are exceptions being thrown. If you can't even get to your application's front page, watch the server console as thg application is being deployed. Often times, you'll receive 404 errors in your application because the server failed to deploy it.

Once the application is deployed successfullly, you can watch the console for errors while you run your application and step through the area of the application that isn't working as expected.


You can access your server console from the Skyway Builder perspective by selecting Window -> Show view -> Console.

Eclipse Debugging Tools

The most direct way to see what's going on in your generated application is to use the built-in Eclipse debugging tools. The key steps are...

1. Set a breakpoint in your generated code.
2. Start your server in Debug mode.
3. Run your application in debug.
4. When prompted, switch to the Eclipse Debug perspective.

If you want to step through the Skyway common execution code, you may need to attach the source code for the Skyway execution jar.

Logging

Skyway provides a Log Message step (in the Services drawer in your Action designer Palette). You can put Log Message steps at key points in your action and print values to your Server console.


Existence of the message in the console will show that the step was executed. Printing values of variables allows you to determine variable content at the time the step was executed. Of course, you'll want to avoid printing things like passwords, because these steps write to the server log.


One nice feature of Log Message steps is that you can leave them in your action and disable them. You can manually disable them or you can configure them to be enabled or disabled based on the value of a variable. See the Log Message step's property sheet for details.

Make sure Action steps are being executed

It's pretty easy to re-work an Action diagram and forget to move the "start" step to the real entry point in the model. Make sure your start step is located where you think it is. Once you know the start step is correct, you can use Log Message steps or the Eclipse debugger to make sure your steps are being executed.

Personal tools