Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #33380

Re: debugging in eclipse

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <d@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'debug': 0.05; 'debugging': 0.05; 'python': 0.09; 'cc:addr:python-list': 0.10; 'def': 0.10; 'file,': 0.15; 'example).': 0.16; 'function?': 0.16; 'importable': 0.16; 'matlab': 0.16; 'test()': 0.16; 'test():': 0.16; 'top- level': 0.16; 'wrote:': 0.17; 'module,': 0.17; 'variables': 0.17; '(by': 0.22; 'lets': 0.22; "i'd": 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'question': 0.27; 'run': 0.28; 'inspect': 0.29; 'running.': 0.29; 'probably': 0.29; 'mode': 0.30; 'code': 0.31; 'print': 0.32; 'done': 0.34; 'problem,': 0.35; 'doing': 0.35; 'add': 0.36; 'but': 0.36; 'useful': 0.36; 'test': 0.36; 'execute': 0.37; 'subject:: ': 0.38; 'mean': 0.38; 'some': 0.38; 'nothing': 0.38; 'possible.': 0.38; 'step': 0.39; 'received:192': 0.39; 'easily': 0.39; 'received:192.168': 0.40; 'end': 0.40; 'your': 0.60; 'email addr:gmail.com': 0.63; 'header:Reply-To:1': 0.68; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; 'yourself': 0.77; 'all!': 0.84; 'received:74.208.4.194': 0.84; 'step,': 0.84
Date Thu, 15 Nov 2012 08:41:40 -0500
From Dave Angel <d@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1
MIME-Version 1.0
To chip9munk@gmail.com
Subject Re: debugging in eclipse
References <b45840eb-f429-4287-905a-76d752d4fe04@googlegroups.com>
In-Reply-To <b45840eb-f429-4287-905a-76d752d4fe04@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:4W8Fbsf50grRP9zBJjApxFaFHOV1sraOOkFWkJNDrpR TxU2Zx2Cie8TLUQ4Z/lY3zcHgX/2SyfZsotKynVUI1dNZFARrr LspxbW20JNQyV2yrYCh0qUZFRdFyK13d/Ti3ANR2CIo7gqAOKk LR0xW93FIpqnAEKh/EfxtiCtS6QD17smQZDjM7BGlLsxj52Ard WXRV7QbQt4RTH0sCFE9icDMovKH2DtRlX0UdbrSapxcrW6Mh1y 5Mq1LEFOPv3Wr4dQNw3XjSHl3McHf5v+P7n7XRFhK28cJtlym6 YtMOHhY95V+Rx22dt6AT0oPvMir6vNcxZqSez5IyhmUA/4kYQ= =
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To d@davea.name
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3714.1352986928.27098.python-list@python.org> (permalink)
Lines 31
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1352986928 news.xs4all.nl 6890 [2001:888:2000:d::a6]:48846
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33380

Show key headers only | View raw


On 11/15/2012 07:29 AM, chip9munk@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 don't know Eclipse, but you probably have to have some top-level code
in your program.  As it stands, it's just an importable module, doing
nothing useful when you run it.

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.

-- 

DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

debugging in eclipse chip9munk@gmail.com - 2012-11-15 04:29 -0800
  Re: debugging in eclipse Roy Smith <roy@panix.com> - 2012-11-15 07:49 -0500
    Re: debugging in eclipse chip9munk@gmail.com - 2012-11-15 05:43 -0800
  Re: debugging in eclipse Dave Angel <d@davea.name> - 2012-11-15 08:41 -0500
    Re: debugging in eclipse chip9munk@gmail.com - 2012-11-15 05:45 -0800
    Re: debugging in eclipse chip9munk@gmail.com - 2012-11-15 05:45 -0800
    Re: debugging in eclipse Roy Smith <roy@panix.com> - 2012-11-15 08:54 -0500
      Re: debugging in eclipse aahz@pythoncraft.com (Aahz) - 2012-11-15 07:56 -0800
        Re: debugging in eclipse Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-15 17:05 +0000
          Re: debugging in eclipse alex23 <wuwei23@gmail.com> - 2012-11-15 17:10 -0800
            Re: debugging in eclipse Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-16 10:30 +0000
  Re: debugging in eclipse "Martin P. Hellwig" <martin.hellwig@gmail.com> - 2012-11-15 05:44 -0800
    Re: debugging in eclipse chip9munk@gmail.com - 2012-11-15 05:46 -0800
      Re: debugging in eclipse Alister <alister.ware@ntlworld.com> - 2012-11-15 14:21 +0000
        Re: debugging in eclipse chip9munk@gmail.com - 2012-11-15 06:28 -0800
  Re: debugging in eclipse Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-11-15 14:43 +0100
    Re: debugging in eclipse chip9munk@gmail.com - 2012-11-15 06:27 -0800

csiph-web