Debugging portlets on remote servers
You must have a remote WebSphere® Portal v6 Server installation to debug a portlet project on a remote server; however, debugging portlets on a local server is always preferred over debugging portlets on a remote server.
The process of debugging a portlet application is exactly the same as for a Web application. You can control and trace the running of the portlet. You can set the break points in the Java™ source code and the JSP files.
To debug a portlet on a remote server:
- Configure debug mode on the remote server.
- In the Project Explorer view, right-click the portlet project and click
Debug As | Debug on Server. The Server Selection panel appears.
- Select an existing remote WebSphere Portal server definition or create a new server.
- Click Finish. This publishes the project to the remote WebSphere Portal server. The Web browser is launched automatically. If you have set breakpoints in your code, and one of them is hit, you will be given the option to open in the Debug perspective.
Note: If the project name, the filename, the file directory structure, or the User ID for the WebSphere Portal login name is too long, an XML exception occurs and the server attach fails. To correct this, shorten the length of the filename, the file directory structure or the User ID for WebSphere Portal login on the remote WebSphere Portal server configuration.
Restrictions: Remote debugging is the only way to debug the following types of portlet applications:
- Personalized portlet applications.
- Portlet applications that require components that are not included in the runtime environment supported by the workbench and must be installed on WAS.
Related tasks
Testing and debugging portlets
Defining remote servers for testing portlets
Defining Web browsers and device emulators
Configuring remote WebSphere Portal servers
Debugging portlets on local servers
Related reference