Changeset 5046 for trunk/GSASIIpath.py
- Timestamp:
- Oct 9, 2021 11:54:26 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpath.py
r4994 r5046 976 976 def InvokeDebugOpts(): 977 977 'Called in GSASII.py to set up debug options' 978 if GetConfigValue('debug'): 979 print ('Debug on: IPython: Exceptions and G2path.IPyBreak(); pdb: G2path.pdbBreak()') 980 import pdb 981 global pdbBreak 982 pdbBreak = pdb.set_trace 978 if any('SPYDER' in name for name in os.environ): 979 print('Running from Spyder, keeping breakpoint() active & skipping exception trapping') 980 elif GetConfigValue('debug'): 983 981 try: 982 import pdb 983 global pdbBreak 984 pdbBreak = pdb.set_trace 984 985 import IPython 985 986 global IPyBreak 986 987 IPyBreak = IPyBreak_base 987 if any('SPYDER' in name for name in os.environ): 988 print('Running from Spyder, skipping exception trapping') 989 else: 990 sys.excepthook = exceptHook 988 sys.excepthook = exceptHook 989 os.environ['PYTHONBREAKPOINT'] = 'GSASIIpath.IPyBreak_base' 990 print ('Debug on: IPython: Exceptions and G2path.IPyBreak(); pdb: G2path.pdbBreak()') 991 991 except: 992 pass 992 print ('Debug on failed. IPython not installed?') 993 else: # not in spyder or debug enabled, hide breakpoints 994 os.environ['PYTHONBREAKPOINT'] = '0' 993 995 994 996 def TestSPG(fpth):
Note: See TracChangeset
for help on using the changeset viewer.