How to debug thread code

z z at z.com
Sun Jul 10 22:37:05 UTC 2022


On Sunday, 10 July 2022 at 21:27:08 UTC, Hipreme wrote:
> I'm stuck in a racing condition right now and I'm unable to run 
> a debugger on the code. Usually I was using Visual Studio 2019 
> for debugging my code, but it shows the following message:
>
> "Your app has entered a break state, but there is no code to 
> show because all threads were executing external code 
> (typically system or framework code)."
>
> I can only access the main thread code which stops on my 
> semaphore

Maybe it will work with an external debugger like x96dbg? With 
debug symbols(i'd recommend LDC build too) it should be able to 
show threads and where in the code it was stuck in(i'm assuming 
each thread will be stuck in a wait loop)
It's also possible the error message is just the truth, but it 
seems weird that it can't at least display the call stack in that 
case.


More information about the Digitalmars-d-learn mailing list