Thread: [Pydev-users] [pydev - Users] Detecting in debug mode
Brought to you by:
fabioz
From: SourceForge.net <no...@so...> - 2008-11-12 22:16:54
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=5631438 By: lparkh Hi, I would like my code when executing to know that I am running in debug mode. __debug__ only distinguishes running for optomization or not. Is there another globally visible variable I could use? Thanks, Lin ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=293649 |
From: SourceForge.net <no...@so...> - 2008-11-16 00:58:00
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=5651978 By: fabioz There's no real global variable to identify that... but a way to detect it would be: def IsInDebugMode(): ....try: ........import pydevd_comm ....except ImportError: ........return False ....else: ........return pydevd_comm.GetGlobalDebugger() is not None Cheers, Fabio ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=293649 |