简体   繁体   中英

How not suspend all threads in Visual Studio 2022 when C++ native breakpoint is reached?

I'm using Visual Studio 2022. I want to set a breakpoint and have the threads that reach it suspend, but I want those threads that have not reached a breakpoint to continue executing as though nothing has happened. Unavoidable consequences of doing this are acceptable to me. In my code, I will have properly synchronized between threads, copied data, and so on. If I do see an unexpected consequence then I've found a bug or learned something interesting about my code.

I found this Stack Overflow article regarding Visual Studio 2008.

VS2008 Suspending all threads upon hitting breakpoint

The article unofficially says Visual Studio 2008 cannot do what I'm asking for in this question. Version 2008 is many versions before today's 2022 yet I still have not found that for which I'm looking.

Before I give up my search, I'm asking this community, Is there a way in Visual Studio C++ native projects to suspend only threads that have reached breakpoints and have all others continue?

In the thread panel, you can resume the execution of the other threads.
If you want that the other threads does not stop, I don't know a way of doing it sadly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM