[Tutor] how to debug python script which is a parameter of first
Alan Gauld
alan.gauld at btinternet.com
Wed Nov 18 07:15:32 EST 2015
On 18/11/15 00:48, John Spitz wrote:
> Using IDE eclipse with pydev, how do I debug a python script which is
> the parameter of the first script?
> ...
> python3.4 run_parallel_tests.py clickurl.py browsers.json
Its almost impossible to say since we don;t know what you re doing in
your tests script. Assuming you just call it using subprocess or
similar then its next to impossible since you are launching another
process. The best bet in that case is to insert print statements but
that then modifies the code which is not ideal in a test environment.
> So in Eclipse, on the run_parallel_tests.py, I have the "Debug
> Configurations" > Arguments tab with:
> clickurl.py browsers.json
>
> but when adding a breakpoint to the clickurl.py it doesn't work???
Breakpoints will only work in the process you are running in the IDE.
We would need to see how the test script works to advise further. There
are several options, none of them particularly easy.
If you want to debug clickurl.py it would be better to work on it
directly and just use the tests script to identify the need to
debug it.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list