Solved

break point by exception and remote debugging

Posted on 2014-03-25
2
383 Views
Last Modified: 2014-04-29
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
Comment
Question by:gudii9
2 Comments
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
ID: 39954859
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
 
LVL 7

Author Comment

by:gudii9
ID: 40007512
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
web services creation SOAP vs REST 5 40
varialbe initialization 11 33
CSV file parsing thru Java 13 28
sql import cannot be resolved jsp 3 20
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question