Solved

break point by exception and remote debugging

Posted on 2014-03-25
2
388 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

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

Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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.

626 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