Re: How to debug thread code

2022-07-12 Thread Kagamin via Digitalmars-d-learn

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.


Re: How to debug thread code

2022-07-10 Thread z via Digitalmars-d-learn

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.


How to debug thread code

2022-07-10 Thread Hipreme via Digitalmars-d-learn
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