Skip to content

Commit f8264af

Browse files
committed
Added information on how to redirect console output when debugging.
This fixes issue #147.
1 parent bbf3efe commit f8264af

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

BUILD.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ To run just the unit tests, run::
6464
python test/run_unit_tests.py
6565

6666

67+
Debugging Selenium2Library
68+
--------------------------
69+
70+
In the course of debugging the Selenium2Library one might need to set a
71+
breakpoint using `pdb`_. Since Robot Framework hijacks the console output
72+
one should use the folowing code to redirect output back to stdout for
73+
debugging purposes.
74+
75+
import pdb,sys; pdb.Pdb(stdout=sys.__stdout__).set_trace()
76+
77+
6778
Testing Third-Party Packages
6879
----------------------------
6980

@@ -274,6 +285,7 @@ are parsed by the reStructuredText parser. To build them, run::
274285
python doc/generate_readmes.py
275286

276287

288+
.. _pdb: http://docs.python.org/2/library/pdb.html
277289
.. _downloads section on GitHub: https://github.com/rtomac/robotframework-selenium2library/downloads
278290
.. _PyPI: http://pypi.python.org
279291
.. _.pypirc file: http://docs.python.org/distutils/packageindex.html#the-pypirc-file

0 commit comments

Comments
 (0)