You can use __debugbreak in the visual studio so that each time the code is called, it starts the debugger (you can search for the function in MSDN).
Insert the instruction into the C ++ function (or class method) that you want to debug, for example.
void foo() { __debugbreak(); [...] }
at this point, compile the library and run the python script, when the library loads and the code is executed, a message appears informing you if you want to attach a visual studio debugger.
This is a replacement for the old __asm { int 3 } .
source share