Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug SCons scripts using eclipse and pydev?

I'm a newbie to SCons and also using pydev. Can someone help me with instructions on how to debug scons scripts using Eclipse and pydev? Is it even possible considering the fact that SCons is a seperate app and not an extension to python?

like image 822
Gnu Engineer Avatar asked Dec 23 '22 10:12

Gnu Engineer


1 Answers

You are right. Since the SCons is python based, the SCons scripts are debuggable via EClipse PyDev. For this, you need to do the following in the debug configuration...

  • 1. Under the main tab, set the main module to the SCons file which will be available under the python/scripts directory if you have installed SCons. If you have not run the install of SCons you can point to this file under the SCons directory.
  • 2. Under the arguments tab, set the working directory to the root of your project.

    Now set the breakpoint either on SConstruct or SConcript and run in debug mode. That's all!! With this approach you can not only debug your product code but also the build scripts that builds your product :-) Happy Debugging!!!!

  • like image 62
    Gnu Engineer Avatar answered Jan 09 '23 11:01

    Gnu Engineer