15

Is there a way to find out the current execution of the code to find out the infinite loop?

I have the application running with the current source. I'm attached with the visual studio debugger. I just need to know where the code is currently at so that I can debug it further.

jdelator
  • 4,101
  • 6
  • 39
  • 53
  • 1
    Hit the pause button. If you need to examine this on a larger, application-wide scale, use a profiler and see where your execution time is going. – 3Dave May 04 '10 at 18:01

1 Answers1

31

If you're running it from Visual Studio, you can pause the execution with the 'pause' button in the code page. The current line will be in green.

David Brunelle
  • 6,528
  • 11
  • 64
  • 104
  • Exactly what I was looking for. Now I have to wait 12 minutes to accept your answer. :) – jdelator May 04 '10 at 18:01
  • also make sure you have compiled/are running in the debug configuration. If you compiled for release then you don't get the debugging feature mentioned. – Greg Bogumil May 04 '10 at 18:03
  • @gbogumil : That actually depends. Sometime I compile in Release and still get the informations. However, it's not always the case, so yes, Debug is the best alternative. – David Brunelle May 04 '10 at 18:42
  • In case the problem resides outside of managed code, here is another approach to debugging it: https://stackoverflow.com/a/57220007/3195477 – StayOnTarget Jul 26 '19 at 12:28