You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to programmatically detect that the code is running in debug mode. Something like #ifdef DEBUG in C. This is needed for additional code that will improve debugging. For example, for CUDA, you need to set the environment variable CUDA_LAUNCH_BLOCKING=1 , etc.
I have already checked the advice from the Internet (+AI):
pdb._getframe().f_back is not None - does not work;
os.getenv('SPYDER_DEBUG_MODE') - does not work;
'ipdb' in sys.modules - does not work.
The text was updated successfully, but these errors were encountered:
I need to programmatically detect that the code is running in debug mode. Something like
#ifdef DEBUG
in C. This is needed for additional code that will improve debugging. For example, for CUDA, you need to set the environment variable CUDA_LAUNCH_BLOCKING=1 , etc.I have already checked the advice from the Internet (+AI):
pdb._getframe().f_back is not None
- does not work;os.getenv('SPYDER_DEBUG_MODE')
- does not work;'ipdb' in sys.modules
- does not work.The text was updated successfully, but these errors were encountered: