This videos shows how to enable debug mode on OpenShift and JBoss Developer Studio 5 to connect to the JBoss application via Port Forwarding.
The steps to do this manually are:
1) Create an empty file .openshift/markers/enable_jpda
2) Commit and push this to OpenShift
3) Right click on server, choose OpenShift > Port Forwarding...
4) Click "Start All", Close the dialog
5) Use "Debug As" > "Confgurations" and setup a Remote Java Application
6) Set the project, host should be localhost and port 8787
7) If you wish go to source tab and add "Maven Source Lookup Container" and point to a local JBoss Application Platform 6
8) Click Debug