Re: debugging in eclipse

2012-11-16 Thread Steven D'Aprano
On Thu, 15 Nov 2012 17:10:27 -0800, alex23 wrote: > On Nov 16, 3:05 am, Steven D'Aprano +comp.lang.pyt...@pearwood.info> wrote: >> > ``1/0`` is shorter.  ;-) >> >> It is also guaranteed to run, unlike assert. > > Only if they actively pass the command line switch to turn it off, Not necessarily

Re: debugging in eclipse

2012-11-15 Thread alex23
On Nov 16, 3:05 am, Steven D'Aprano wrote: > > ``1/0`` is shorter.  ;-) > > It is also guaranteed to run, unlike assert. Only if they actively pass the command line switch to turn it off, which I'd assume someone intentionally using an assertion wouldn't do. -- http://mail.python.org/mailman/li

Re: debugging in eclipse

2012-11-15 Thread Steven D'Aprano
On Thu, 15 Nov 2012 07:56:17 -0800, Aahz wrote: > In article , Roy Smith > wrote: >>In article , >> Dave Angel wrote: >>> >>> I'd also add a print statement, just to assure yourself that it's >>> running. >> >>My trick to make sure something is running is to add "assert 0". > > ``1/0`` is shor

Re: debugging in eclipse

2012-11-15 Thread Aahz
In article , Roy Smith wrote: >In article , > Dave Angel wrote: >> >> I'd also add a print statement, just to assure yourself that it's running. > >My trick to make sure something is running is to add "assert 0". ``1/0`` is shorter. ;-) -- Aahz (a...@pythoncraft.com) <*> htt

Re: debugging in eclipse

2012-11-15 Thread chip9munk
On Thursday, November 15, 2012 3:21:52 PM UTC+1, Alister wrote: > doing it that way means that it will only call test when executed > directly & not when imported as a module I see, thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: debugging in eclipse

2012-11-15 Thread chip9munk
On Thursday, November 15, 2012 2:43:26 PM UTC+1, Ulrich Eckhardt wrote: > Should that be "return c" instead of "c" on a line? oh it is just a silly example function, the functionality is not important. It does not have to return anything... > For a start, I would try to actually call the functio

Re: debugging in eclipse

2012-11-15 Thread Alister
On Thu, 15 Nov 2012 05:46:49 -0800, chip9munk wrote: > On Thursday, November 15, 2012 2:44:22 PM UTC+1, Martin P. Hellwig > wrote: >> I assume you have at the end of the debugTest.py file something like >> this: >> if __name__ == '__main__': >>test() > > no i did not have it... > > is main r

Re: debugging in eclipse

2012-11-15 Thread Ulrich Eckhardt
Am 15.11.2012 13:29, schrieb chip9m...@gmail.com: 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. Should that be "return c" instead of "c" on a line? Now I would like to debug it in eclipse.. (I h

Re: debugging in eclipse

2012-11-15 Thread Roy Smith
In article , Dave Angel wrote: > I'd also add a print statement, just to assure yourself that it's running. My trick to make sure something is running is to add "assert 0". To be fair, I usually start by adding a print statement, as Dave suggests. If I see the output, I know it ran. But if

Re: debugging in eclipse

2012-11-15 Thread chip9munk
On Thursday, November 15, 2012 2:44:22 PM UTC+1, Martin P. Hellwig wrote: > I assume you have at the end of the debugTest.py file something like this: > if __name__ == '__main__': >test() no i did not have it... is main really necessary? -- http://mail.python.org/mailman/listinfo/python-li

Re: debugging in eclipse

2012-11-15 Thread chip9munk
On Thursday, November 15, 2012 2:42:09 PM UTC+1, Dave Angel wrote: > Add a call to test() to the end of the file, and it might do better. > > I'd also add a print statement, just to assure yourself that it's running. > > thanks, that is it, (stupid me) now if I have many functions in the model

Re: debugging in eclipse

2012-11-15 Thread chip9munk
On Thursday, November 15, 2012 1:49:22 PM UTC+1, Roy Smith wrote: > Heh. It took me a while to realize that the subject line was not > referring to > http://en.wikipedia.org/wiki/Solar_eclipse_of_November_13,_2012 :)) -- http://mail.python.org/mailman/listinfo/python-list

Re: debugging in eclipse

2012-11-15 Thread Martin P. Hellwig
On Thursday, 15 November 2012 12:29:04 UTC, chip...@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

Re: debugging in eclipse

2012-11-15 Thread Dave Angel
On 11/15/2012 07:29 AM, chip9m...@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 w

Re: debugging in eclipse

2012-11-15 Thread Roy Smith
In article , chip9m...@gmail.com wrote: > Now I would like to debug it in eclipse.. Heh. It took me a while to realize that the subject line was not referring to http://en.wikipedia.org/wiki/Solar_eclipse_of_November_13,_2012 -- http://mail.python.org/mailman/listinfo/python-list

debugging in eclipse

2012-11-15 Thread chip9munk
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 h

Re: debugging in eclipse+pydev

2006-06-18 Thread Fabio Zadrozny
Hi,On 18 Jun 2006 07:46:48 -0700, yaru22 <[EMAIL PROTECTED]> wrote: Hi.I'd like to know how to debug in eclipse+pydev.In the menu, "Pydev Debug", there's Start Debug Server option, but Idon't know how to use it.Few questions I have about debugging are: 1) how do i set a breakpoints in pydev?2) how

debugging in eclipse+pydev

2006-06-18 Thread yaru22
Hi. I'd like to know how to debug in eclipse+pydev. In the menu, "Pydev Debug", there's Start Debug Server option, but I don't know how to use it. Few questions I have about debugging are: 1) how do i set a breakpoints in pydev? 2) how do i execute the code line by line? I mean... step into, st