Reputation: 331
I have a very big piece of code and whenever it run for 20sec, it will be stuck somewhere and the program freezes. I suspect it stuck in a loop or waiting for some event to happen before it continue.
How do I identify that piece of code? I tried setting breakpoint but it seems too slow. If I set breakpoint at line 1, it will take few hundred iteration before I reach the offending code.
Upvotes: -1
Views: 2785
Reputation: 32681
Apart from debugging which you have already tried, You can do the following 2 things.
Though i must say that finding the problem is mostly a tedious job.
Upvotes: 3