0

recently I try to review an old JavaWeb project written in Myeclipse, it is sort of bulky. I start Tomcat and console output shows:

1

1

filter--in

I remember that I added a filter, so the filter--in is ok, I know where it comes from and where to find source code that generates this output.

But,the double wired 1 above is not. I hava no idea which code line made this output. I must have written some code like System.out.println("1") in order to debug when I built this project long time ago.

I try to find an easy way to find the output generator code. Here are ways I think that might work:

  • dig deeply line by line until I find it ( it's stupid and it waste time )
  • use debug mode of MyEclipse. ( I tried, but it seems that I still need to know where is the target code in order to set breakpoint)

I don't think that I master the way to solve it. Are there tips or skills that work or work easier?

Calvino Shaw
  • 481
  • 1
  • 7
  • 10

1 Answers1

0

You could try one of the search facilities (Search Text, Search Java) or you could put a breakpoint in the java.io.PrintStream.println(String) method (and/or similar methods) and trace the stack back to your code when the breakpoint is hit during a debugging session.

Tony Weddle
  • 2,081
  • 1
  • 11
  • 15