How can I detect in my python script if its being run by the debug interpreter (ie python_d.exe rather than python.exe)? I need to change the paths to some dlls that I pass
Distutils use sys.gettotalrefcount to detect a debug python build:
# ...
if hasattr(sys, 'gettotalrefcount'):
plat_specifier += '-pydebug'
*_d.exe
'. It works for any name._d.pyd
' suffix.See Debugging Builds and Misc/SpecialBuilds.txt