I'm trying to debug a SConstruct file that's failing deep deep into some obscure function, and I want to step through the code. This is what I tried to do, and failed:
$ python -m pdb `which scons.py`
> c:\python27\scripts\scons.py(26)<module>()
-> __revision__ = "src/script/scons.py 5357 2011/09/09 21:31:03 bdeegan"
(Pdb) b SConstruct:10
*** 'SConstruct' not found from sys.path
(Pdb) import sys, os
(Pdb) sys.path.append(os.getcwd())
(Pdb) b SConstruct:10
*** 'SConstruct' not found from sys.path
(Pdb)
If I rename SConstruct to SConstruct.py, it succeeds to set a breakpoint, but of course it doesn't work, because "scons" loads SConstruct, not SConstruct.py.
Any way to force python to put a breakpoint there?
I'm running this from a msys bash console on a Win7 system.
Python version:
$ python
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.