Debugging portlets

You can debug portlet applications that are running on WebSphere Portal installed locally on your workstation or on a remote machine.

The process of debugging a portlet application is the same as debugging a Web application. You can control and trace the execution of the portlet. You can set the break points in the Java source code and the JSP files.

To debug your portlet application, you need to define a WebSphere Portal Test Environment server (for local debugging) or a WebSphere Portal Server Attach server (for remote debugging). For more information on creating servers, refer to Defining servers for testing portlets.

 

Local debugging

You can debug a portlet application running on WebSphere Portal installed within the workbench. The behavior of the portlet application is the same as when it runs on WebSphere Portal. To enable local debugging, do the following:

For more information on the local debugging, refer to Debugging portlets locally.

 

Local debugging benefits

When debugging locally, the server is running against the resources that are in the workbench. Therefore, you can add, change, or remove a resource from a portlet project and the server will pick up these changes automatically. In the local debugging, the following operations required to debug portlets are automatically executed when you start the server.

It is recommended that you debug portlets locally, unless debug them remotely.

 

Local debugging restrictions

To debug the following kinds of portlet applications, remote debugging is the only option:

To continue debugging after changing portlet properties, such as the portlet name or supported markups and modes during debugging, you may have to publish on WebSphere Portal and restart the server.

 

Remote debugging

You can debug a portlet application running on WebSphere Portal on a remote system accessible through a network connection. Do the following to debug remotely:

For more information on the remote debugging, refer to Debugging portlets remotely.

 

Remote debugging benefits

Remote debugging is useful when the program that you are debugging is running on another system and behaves differently on that system than on your own.

 

Remote debugging restrictions

Remote debugging is similar to local debugging. Changes made in the workspace require republishing before they take effect on the server. There could also be network delays.

 

Related tasks

Debugging portlets locally
Debugging portlets remotely
Defining servers for testing portlets

Related reference
Troubleshooting