I am working with python standard library/some 3rd party module which is not working as expected. I used below steps to install the module.
sudo git clone http://github.com/someopensourcemodule.git
sudo python setup.py install
There is a failure which is seen in the above library which I am using, this library is used part of some other script(a complex script with lot of dynamic binding).
What I want to do is add a few print statements in foo module and also have an ability to step through the code. What options do I have?
- Create a virtual environment.
- Modify the source add prints and install using
python setup.py install
again - check the stdout for variable and stack value.
- options which I can use pdb, pudb, or Debugging tools in python, this works well for modules. However I am not sure about modules which are installed using
python setup.py install
.
I want to know what are best practices which can be followed to debug module which is installed in system.