• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Strange doubt

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
This may sound numb but I terribly need a solution for this.
I've written an abstract class (say ABC.java) and an implementation code for it (say ABCImpl.java).

Now that in some other java class(Main.java), I'm using using an object of type ABC. But how to debug into methods of implementation part ABCImpl.java) when I wish to do so.
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Now that in some other java class(Main.java), I'm using using an object of type ABC. But how to debug into methods of implementation part ABCImpl.java) when I wish to do so.



Well, you can use a debugger. For somewhat small applications, within a single JVM, the standard debugger with most IDEs are fine.

Otherwise, you should consider using logging (or just sysouts) to keep track of what is going on.


Personally, I recommend doing both. If possible, write small testing classes, which can be used to debug individual components. While use logging when you want to test the whole (large) application.

Henry
[ December 17, 2008: Message edited by: Henry Wong ]
 
Gowrishankar Subramanian
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Henry, Thanks for the speedy reply.

The problem is neither the debugger nor the Sysouts work. I can't use a logger as of now for some internal reasons.

When I use debugger, I couldn't step onto the lines in the implemented code. All I can see is some blank white window. I should also make a point that, I use spring configurations for declaring, defining and creating objects on the fly.
 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I should also make a point that, I use spring configurations for declaring, defining and creating objects on the fly.



Yea, spring does add a level of indirection that makes it harder to debug. But why won't sysout work? You can sysout to a file, if the stdout had been routed.

Henry
 
Gowrishankar Subramanian
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Writing to a file was a great idea!! Why did I miss that one?

Thanks a lot, Henry
 
reply
    Bookmark Topic Watch Topic
  • New Topic