If your program is stuck in an infinite loop I don't think there is anything you can do with the debugger.
However if it crashes or comes across a 'stop' command then it will show the line that the stop or crash came on, in the case of a 'stop' you can then step through the code.
It also shows you the value of any local and global variables and types.
However if it crashes or comes across a 'stop' command then it will show the line that the stop or crash came on, in the case of a 'stop' you can then step through the code.
It also shows you the value of any local and global variables and types.