Please note:The SCons wiki is now restored from the attack in March 2013. All old passwords have been invalidated. Please reset your password if you have an account. If you note missing pages, please report them to webmaster@scons.org. Also, new account creation is currently disabled due to an ongoing spam flood (2013/08/27).

Tips for debugging SCons code and your scripts

To use local scons source rather than installed:

Put these lines in a shell script and run the script. If you want to run it regularly, make the script executable and put it in your private bin directory.

   1 SCONS_LIB_DIR=/path_to_scons/src/engine
   2 export SCONS_LIB_DIR
   3 exec python /path_to_scons/src/script/scons.py .

You can also run from a checked-out SCons source dir using bootstrap.py, which takes the same args as SCons. That should always use the SCons engine from where bootstrap.py is found.

   1 python /path_to_scons_src/bootstrap.py .

If you run the commands by hand, don't include the "exec" in the final line.

To run under debugger:

   1 scons --debug=pdb <args...>
   2 b SCons/Tool/msvc.py:158 # to stop at that file:line, looks for file in sys.path e.g. your SCONS_LIB_DIR

DebuggingScons (last edited 2009-09-11 17:28:16 by GaryOberbrunner)