debugging in eclipse

Martin P. Hellwig martin.hellwig at gmail.com
Thu Nov 15 08:44:21 EST 2012


On Thursday, 15 November 2012 12:29:04 UTC, chip... at gmail.com  wrote:
> Hi all!
> 
> 
> 
> I have a stupid problem, for which I cannot find a solution...
> 
> 
> 
> I have a python module, lets call it debugTest.py.
> 
> 
> 
> and it contains:
> 
> def test():
> 
>     a=1
> 
>     b=2
> 
>     c=a+b
> 
>     c
> 
> 
> 
> so as simple as possible.
> 
> 
> 
> Now I would like to debug it in eclipse.. (I have pydev and all)
> 
> so the question is how do I debug the test function? (by debug I mean go into it in the debugging mode and execute step by step, inspect the variables and so on.. you know, like it is so easily done in Matlab for example).
> 
> 
> 
> I place a break point in the function, run the debugger and it stars and is terminated immediately. (of course it does not know where to go..)
> 
> 
> 
> So how can I do this? please help!
> 
> 
> 
> Thank you all in advance!

I assume you have at the end of the debugTest.py file something like this:

if __name__ == '__main__':
   test()



More information about the Python-list mailing list