> you should also configure the VS debugger to load symbols.
What extra settings need to be done for this?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am having a hard time to debug the int _Mtx_lock(_Mtx_t mtx) function defined inside mutex.c
I could debug upto following implementation inside \include\mutex
void lock() {
_Check_C_return(_Mtx_lock(_Mymtx()));
}
However debug control never goes inside _Mtx_lock(), putting a breakpoint says "The Breakpoint currently will not be hit. No symbols have been loaded for this document"
I am using VS2019 Community edition,Version 16.8.2
Just trying to debug following code,
int mt_val = 0;
std::mutex mx;
{
std::lock_guard<std::mutex> gd(mx);
mt_val++;
}
Any help in this regard is highly appreciated.
Thanks
> you should also configure the VS debugger to load symbols.
What extra settings need to be done for this?
Hi GHANASHYAMSATPATHY,
You could go to Tools/Options/Debugging/General, then disable "Enable just my code"
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our *
*documentation* to enable e-mail notifications if you want to receive the related email notification for this thread.**
I disabled "Enable just my code" from Tools/Options/Debugging/General and still see the same issue. Restarted the Visual Studio also , however issue still persists.
I can't debug _Mtx_lock(_Mtx_t mtx) function defined inside mutex.c
Thanks
Hello,
it is a function in Visual Studio. If the function is not defined in the header file, then you cannot debug the source code because it's hidden in a library.
Have a look at this example: lock_guard
IMO if you think that you have problems with the function, it should already be a problem in your source code before. How do use the class? Please provide more information.
Regards, Guido
I am trying to use and debug following code, similar to example you have shown.
int mt_val = 0;
std::mutex mx;
{
std::lock_guard<std::mutex> gd(mx);
mt_val++;
}
And my intent is to debug _Mtx_lock(_Mtx_t mtx) function defined inside crt\src\stl\mutex.c which I am not able to. I am able to debug following and get inside of following implementation inside \include\mutex
void lock() {
_Check_C_return(_Mtx_lock(_Mymtx()));
}