Solved

break point by exception and remote debugging

Posted on 2014-03-25
2
381 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This video teaches viewers about errors in exception handling.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now