Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8892867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:06:49+00:00 2026-06-14T23:06:49+00:00

Every once in a while I’m in the Eclipse Debug mode, and wish I

  • 0

Every once in a while I’m in the Eclipse Debug mode, and wish I could simply pick the Object that I am currently inspecting/watching, put some kind of “Object Breakpoint” on it, and step to the next line of code that accesses it.

Now, I know that I can put breakpoints on Classes, but I usually have hundreds or even thousands of instances in memory, most of which have a long life time. They often go in and out of frameworks. They are wrapped into Collections, filtered and unwrapped again. In short: a regular, large application.

Usually I still find the problem by looking for rare features of that Object, using conditional method breakpoints and a lot of informed guessing. However, I think I sometimes could be much faster if I had something like the described feature.

What I found after some searching is the Debug Proxy (scroll down to examples). It is a container class that will use Javas reflection API to make itself look like the contained Object, thus you can use it instead of the contained Object in your application. Being an InvocationHandler, the DebugProxy can now “intercept” invocations of methods in the contained Object.

Using the proxy for actual debugging is as easy as adding this line to your application.

IMyObject = (IMyObject) DebugProxy.newInstance(new MyObject());

I can then set breakpoints inside the DebugProxies source code.

However, there are at least two problems with this approach.

  1. It works but it is still a hack, and there are a lot of features missing, such as filtering options.
  2. The Proxy-Object cannot be down-cast to the implementing class.

The 2. problem is the more serious one. I was able to use the DebugProxy with Classes generated by EMF, and there is no problem to follow the Object throughout the Framework. However, when I am trying to debug code that doesn’t use interfaces for all interesting Classes, the DebugProxy will quickly fail.

Does anybody know about alternatives?
Maybe the Eclipse JDT Debugger already has such a feature and I simply don’t see it!?

I know there is the Java instrumentation API, and frameworks such as AspectJ. Could these be used to get a practical solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:06:50+00:00Added an answer on June 14, 2026 at 11:06 pm

    I added basic filtering to the DebugProxy and modified the output so Eclipse Console View shows a link to the calling line of code:
    enter image description here

    Problem number two remains unsolved, though. I put up the source code on GitHub. Maybe somebody will come up with something.

    A completely different way to approach this would be to automatically add breakpoints with conditions comparing the current hashCode() with the HashCode of the Object in question. This may not be too difficult for someone who knows more about the JDT internals.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using Visual studio 2008. Every once in a while files that exist in
I have a cron job that runs every minute. Every once in a while
I have a MySQL database that is continually growing. Every once in a while
I realize that every once a while when I create a website, there is
We get CoreData could not fulfill a fault every once in a while. We
Every once in a while a borked Eclipse build gets nailed down to the
Every once in a while I get a entry in my stats that say
I've got some system level code that fires timers every once in a while,
Every once and a while I get this error in IE when making an
In this very simple code example, messages get lost every once in a while.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.