Remote debugging

When you are building a PowerBuilder custom class user object as an EAServer component, you can use the PowerBuilder debugger to debug the EAServer component. You can debug the component whether you use the live editing feature in the User Object painter or deploy the component to EAServer from the Project painter.

For more information about live editing, see “Live editing”.

Getting ready to debug a component

Before you begin debugging a remote component, check that your configuration meets the following requirements:

Selecting EAServer components for debugging

When you debug an EAServer target, the set of components that can be debugged is determined from the project. The set includes all components selected on the Components page in the Project painter for which the Remote Debugging check box is selected. If you want to select a different set of components or debug components from more than one package, select Debug>Select Components from the menu bar in the debugger or click the Select Components button on the PainterBar.

Starting the debugger

To begin debugging, open the target that contains the deployed components. Click the Start Remote Debugging button in the PainterBar and complete the wizard. You can select only components that were generated in PowerBuilder with remote debugging support turned on. Remote debugging support is a security setting that does not add any debugging information to the component. You turn remote debugging support on when you are testing a component, then turn it off when you deploy the component to a user’s site to prevent users from stepping into and examining your code.

Set breakpoints as you would when debugging a local application, then start the client application that invokes the remote components (if it is not already running).

Differences from local debugging

You will notice two major differences between debugging local and remote applications:

NoteUnsupported features The Objects In Memory view, expression evaluation, and changing variable values are not supported.

About states

The instances view shows the state of each instance of each component:

When an instance is destroyed, it is removed from the Instances view.

Multiple instances

Multiple component instances can be stopped at the same time, but actions you take in the debugger act only on the first instance that hits a breakpoint. This instance is indicated by a yellow arrow in the Instances view. The current instance changes to the next instance in the queue when the method completes or when you click Continue.

You can also change context from one instance to another by double-clicking the new instance in the Instances view. You might want to do this if you step over a call to another component instance and the Instances view shows that the called instance stopped.