title: python debugging- get execution time for each line within a loop
body: <p>In my code, the execution time of my for loop is increasing by roughly 1 second after roughly 1000 iteration. So, I am suspecting, there is something wrong within my for loop. I have break point after 1000 iteration, but i need to know which line is taking more time. use of <code>time.time()</code> while line-by-line debugging is certainly not a good idea. I could have used <code>timeit</code> to get the exact execution time for a block of code but it also not a good idea for my case, because i need to get the execution time of each line within a for loop, but not the whole loop. In this case what should i do? I am using <strong>pycharm</strong> for debugging. is there any option in this editor?      </p>