The debuggee is the application being debugged which can be running on either a local or remote machine. Doing remote debugging, it means that you can use the debugger to debug code that has already been deployed on a remote machine or running in a different VM instance.
JDeveloper IDE supports both local debugging and remote debugging. For local debugging, JDeveloper automatically launches the debuggee and then attaches the debugger to that program. In remote debugging, you must manually launch debuggee. If you're remote debugging a JSP or a servlet, you must manually start a browser to invoke your JSP or servlet. Once the debuggee is launched and the JDeveloper debugger is attached to it, remote debugging is very similar to local debugging.
Usually, the debugger attaches to the debuggee. It is also possible that the debugger listens and the debuggee attaches to the debugger. In this article, we will show you how to set up and use a Jdeveloper to do remote debugging of applications deployed to WebLogic server (WLS).
Configuring the Remote WLS
To debug an application deployed to the WLS, you first make sure that WLS server is running using the following extra Java options:
When WLS starts, it opens up @{debug.port} (e.g., 4000) and default port is 8453.
Configuring the JDeveloper
Assume you have deployed your application to the remote WLS server. Now let's setup JDeveloper to do the remote debugging. Follow the steps below:
JPDA stands for Java Platform Debugger Architecture. It’s a multi-layered debugging architecture which enables a tool developer such as Oracle JDeveloper to easily and effectively develop a debugger application which will run across platforms, virtual machine (VM) implementations and JDK versions. For more information, see the references.
Summary
You can use JDeveloper IDE to remote debug Java programs, JSPs, servlets, or distributed applications. For debugging Web pages such as JSPs or servlets, you can also use its HTTP Analyzer.
References
JDeveloper IDE supports both local debugging and remote debugging. For local debugging, JDeveloper automatically launches the debuggee and then attaches the debugger to that program. In remote debugging, you must manually launch debuggee. If you're remote debugging a JSP or a servlet, you must manually start a browser to invoke your JSP or servlet. Once the debuggee is launched and the JDeveloper debugger is attached to it, remote debugging is very similar to local debugging.
Usually, the debugger attaches to the debuggee. It is also possible that the debugger listens and the debuggee attaches to the debugger. In this article, we will show you how to set up and use a Jdeveloper to do remote debugging of applications deployed to WebLogic server (WLS).
Configuring the Remote WLS
To debug an application deployed to the WLS, you first make sure that WLS server is running using the following extra Java options:
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=@{debug.port}
When WLS starts, it opens up @{debug.port} (e.g., 4000) and default port is 8453.
Configuring the JDeveloper
Assume you have deployed your application to the remote WLS server. Now let's setup JDeveloper to do the remote debugging. Follow the steps below:
- Open the JDeveloper
- Go to Tools -> Preferences -> Debugger -> Breakpoints -> Choose Global (Radio box)
By selecting Global, it means that breakpoints set next are active whenever you are debugging, regardless of what project you are using. - Open the source codes. Set the break points as needed
- Right click your project and select Project Properties -> Run/Debug/Profile
- Select Default Run Configurations and Edit it
- Click on Remote Debugging and Profiling check box in Launch Settings option
- Go to Debugger -> Remote Options. Update the following properties:
- Protocol = Attach to JPDA
- Host = Host of the Remote server
- Port = Debug Port number (eg: 4000)
- Right click on your project -> Click on Start Remote Debugger
- A dialog will pop up and make sure your configurations are correct
- Activate your application deployed on the remote WLS server via some mechanisms. This should trigger the break points that you have set in JDeveloper.
JPDA stands for Java Platform Debugger Architecture. It’s a multi-layered debugging architecture which enables a tool developer such as Oracle JDeveloper to easily and effectively develop a debugger application which will run across platforms, virtual machine (VM) implementations and JDK versions. For more information, see the references.
Summary
You can use JDeveloper IDE to remote debug Java programs, JSPs, servlets, or distributed applications. For debugging Web pages such as JSPs or servlets, you can also use its HTTP Analyzer.
References
3 comments:
Hi Stanley ! Thank you for very usefull post! I would like ask you(may be you know) : what option in weblogic server administration console ->Servers(I click on my AdminServer)->Debug tab should I check for proper debuging? Where a lot of them :) I suppose then I check them the server adds in WSL start script proper options for debug (yuo mentioned about them in your blog) BR,Viacheslav
Nice article ,Remote Debugging was the single most feature which is very useful while developing larget enterprise application, specially
if your applicaiton is live and you don't have proper development environment setup in your dev box.
Thanks
Javin
How to setup remote debugging in Eclipse
Thanks for the instructions.
I need to debug my app but I get this instead
...........................................................................................Debugger unable to connect to remote process.
Any pointers ?
Post a Comment