DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Simplify NoSQL Database Integration in Java With Eclipse JNoSQL 1.1.3
  • Domain-Driven Design: Manage Data With Jakarta Data and JNoSQL
  • Understanding and Learning NoSQL Databases With Java: Three Key Benefits
  • Achieving Inheritance in NoSQL Databases With Java Using Eclipse JNoSQL

Trending

  • Unlocking the Benefits of a Private API in AWS API Gateway
  • Introduction to Retrieval Augmented Generation (RAG)
  • Event-Driven Architectures: Designing Scalable and Resilient Cloud Solutions
  • Role of Cloud Architecture in Conversational AI
  1. DZone
  2. Coding
  3. Frameworks
  4. Tips and Tricks for Debugging in Eclipse

Tips and Tricks for Debugging in Eclipse

In this article I will describe some tips and tricks for debugging your applications in Eclipse.

By 
chander prakash user avatar
chander prakash
·
Apr. 04, 08 · News
Likes (4)
Comment
Save
Tweet
Share
145.4K Views

Join the DZone community and get the full member experience.

Join For Free

educational portalmbbs in india

In this article I will describe some tips and tricks for debugging your applications in Eclipse. I will cover the debug details formatter, breakpoints on classes only, as well as how to display all references and instances of a particular object or class.

Debug details formatter

 download music from mp3 search engine

When you debug your application you probably use the Variables view. One of the disadvantages is that you cannot see the data inside complex objects (unless they implement toString() method). Eclipse allows you to write your own formatter for displaying the content you are interested in. You can do it in the Eclipse preferences under Java->Debug->Detail Formatters.

Lets consider the following class:

1

 

When you want to check the value of the an object of this class during the debugging session you have to expand the object and inspect the value of all it’s parts. (see the picture below).

23

Let’s write our own formatter:

download Eclipse34

And now in the Variables view we can see that the person object is shown differently:

455

If you want to see the formatter in the labels for variables you have to select the following option in the Eclipse preferences:

678

This allows you to see the result of your formatter in the value field of the Variables view:

98

I find this option very useful also for the standard classes (e.g. ArrayList), then instead of:

87

I can see:

657

 

Toggling class breakpoints on the class without the source code

When you want to stop the execution of your application in the moment when some of your class is loaded by the class loader you can use the class breakpoints (just toggle the breakpoint on the line when the declaration of the class begins). But what about the situation when you want the same behavior when a class, which you don’t have the sources for, is loaded? How to toggle such a breakpoint without the source code? You just have to go to the main menu and choose Run->Add Class Load Breakpoint…

ty

 

Displaying all references of an object (new in Eclipse 3.3)

Sometimes it is worth to see all references of some object. How to achieve this? There are two ways of doing this. If you want to display references of the specific object, right click on the object in the Variables view and choose All References. The popup window will appear with all references. If you want to see all references of all available objects go to the menu in the Variables view and choose Java->Show References.

kjhhjkl

 


Displaying all instances of a class (new in Eclipse 3.3)

If you want to see all instances of a class just mark this class in the Java editor and choose All Instanced from the context menu.

dsdsfs

dfdsf

 

Please visit Eclipseeducational portal , share your knowledge and get paid.

 

Eclipse

Opinions expressed by DZone contributors are their own.

Related

  • Simplify NoSQL Database Integration in Java With Eclipse JNoSQL 1.1.3
  • Domain-Driven Design: Manage Data With Jakarta Data and JNoSQL
  • Understanding and Learning NoSQL Databases With Java: Three Key Benefits
  • Achieving Inheritance in NoSQL Databases With Java Using Eclipse JNoSQL

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!