Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 398
  • Last Modified:

break point by exception and remote debugging

you can add break point by exception.


debug a remote Java application is important if java application deployed remotely in other country
I was reading as above. How to add break point by exception? also what is remote debugging and how to do it
please advise
Any links resources ideas highly appreciated. Thanks in advance
0
gudii9
Asked:
gudii9
1 Solution
 
mccarlIT Business Systems Analyst / Software DeveloperCommented:
You don't mention what you are using to debug your application, but I will assume that you are talking about Eclipse!?

Simply go to the "Run" menu and then select "Add Java Exception Breakpoint...", choose which Exception class that you want to break on and click Ok.



"Remote Debugging" means that the debugger (Eclipse) that is running in one JVM can "attach" to a separate JVM (this may be also running on the same machine, or a machine next to you or one in another country, perhaps) and pause execution, inspect variables, etc, etc, all the things that you can do when normally debugging java apps.

To do this, you still need the code/project on your local Eclipse machine. Then go to "Run" menu and then select "Debug Configurations...", find the "Remote Java Application" on the left side, and click the "New" configuration button (top left). On the right, give the configuration a name, check that the project is the one you want to debug, and then enter the host/port information of where the debugger can attach to the remote JVM (note that the remote JVM has to have been started with option to enable remote debugging and setting the port to listen on). Then click "Debug" (bottom right) and if everything is in order, it will attach to the remote JVM and you can then pause execution, set breakpoints, etc, etc.
0
 
gudii9Author Commented:
As attached in the project name do i supposed to give remote project name?
Does the remote project application has to be connected to internet connection?
I see 'Standard Socket Attach'
and

''Standard Socket Listen'
What is the difference between those two. Please advise
DebugConfiguration.jpg
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now