I've written a delphi program, which has grown to some complexitiy. Now I'm facing the problem, that I introduced somewhere an infinite loop, but I can't find the location. The program is a realtime application and hang up indefinitely. Is there a possibility to pause the exectution and find out, where my program currently is?
When I use the pause button of the delphi debugger, it always breaks in the cpu-window at a line called ntdll.RtlUserThreadStart
, seems to be some kind of os method, but I have no idea what that means. Even stepping through the assembler doesn't return me in any line of my code. Is there a possibility to say the debugger to stop at an arbitary line in my code, where it's executing?
The debugger might be showing the stack trace of a different thread then what you expect when you pause the program. You can check that from the "Thread Status" window (Ctrl+Alt+T).
When you pause in the debugger, it won't necessarily show you the "main" thread, but all the threads will be paused. Use the thread debug window to select a different thread.
The current execution point might not be in your code. Use the call-stack debug window to see how your program got to where it is and to select which point in the stack you're interested in. You can use the "step out" command to leave the current function and go back up to the caller. That's useful when the debugger pauses your program in a library function that you don't have the source for.
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