Is there a way to put a breakpoint on every line in Eclipse?
The reason I ask is because I am analyzing a proxy program written in Java, which waits and listens for connections. I'm trying to follow how it works, but I can't figure out where the code starts from when a connection arrives.
How can I trigger a breakpoint no matter where the code starts from, in other words, breakpoint every line?
Select all the methods using ctrl . Right click and select Toggle Method Breakpoint .
Press F3 and then press F9 to add a breakpoint.
Right-click the breakpoint icon ( ) or watchpoint icon ( ) in the marker bar, and then select Breakpoint Properties. This opens a Properties dialog box. To add a hit count, select Hit count, click and select the required operator, and then enter the required value.
By default only the thread that hits the breakpoint stops. However, you can modify the behavior by changing the breakpopint properties. Save this answer.
I can't think of a reason you'd want a breakpoint on every line. It would be equivalent to simply putting a breakpoint at the first line of main()
, then stepping through your program with step into
-- not something a sane person would normally want to do with a large program.
I would suggest:
If you like, you can now connect to your proxy with a client, and use the debug step controls to watch how the code handles it. One problem with this is that things time out while you're looking at steps, so it can be useful to set longer timeouts where possible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With