www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to debug thread code

reply Hipreme <msnmancini hotmail.com> writes:
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
Jul 10 2022
next sibling parent z <z z.com> writes:
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.
Jul 10 2022
prev sibling parent Kagamin <spam here.lot> writes:
On Sunday, 10 July 2022 at 21:27:08 UTC, Hipreme wrote:
 "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)."
Open the threads window and click on threads there, their stack will be in the stack window.
Jul 12 2022