• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Strange doubt

 
Gowrishankar Subramanian
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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.
 
Henry Wong
author
Marshal
Pie
Posts: 21423
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • 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
  • 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
Marshal
Pie
Posts: 21423
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Writing to a file was a great idea!! Why did I miss that one?

Thanks a lot, Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic