MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Debugging Mathematica Code (Mathematica 7)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95524] Re: Debugging Mathematica Code (Mathematica 7)
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 20 Jan 2009 06:57:52 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <gl1okn$dpb$1@smc.vnet.net> <gl4a7r$gi7$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

the Wolfram Workbench has an excellent debugger
and there are situations where you need it.

BTW: What is so complicated ?
- go to the Evaluation Menu and open the Debugger
- now type into a notebook

foo[0] = 1
foo[n_Integer] /; n > 0 := n*foo[n - 1]


use the mouse and mark in
foo[n_Integer] /; n > 0 := n*foo[n - 1]
the "foo[n - 1]" expression.

Go to the debugger window and use
"Break at selection" Now the "foo[n - 1]"
has a red frame.

Finally go to the notebook window and enter

foo[4]

as an input. And ... ta ta ta
The Stack window show the stack
and all is as it should. Now press "Continue"
ind the debugger menu to see the next
step in the recursion ...

Regards
   Jens





magma wrote:
> No, there isn't a decent explanation.
> You can check prior posts by me and others on debugging, but this is
> the conclusion, basically.
> Anyway, the general feeling among knowledgeable users is that you do
> not really need a debugger.
> These users just sprinkle print statements here and there to see
> intermediate results.
> I additionally also use On[] and Off[] which help me see clearly the
> code flow.
> You don't really need much more.
> 
> hth
> 
> 
> 
> 
> 
> On Jan 19, 12:36 pm, "m.g." <m... at michaelgamer.de> wrote:
>> Hello Experts,
>>
>>   I made my fist steps with the Mathematica (so called) debugger and st=
> umbled
>> immediately. Is there anywhrere a documentation of this tool that is
>> worth it's name (a criterion which the Mathematica 7 documentatin on debu=
> g
>> surely fails). I've tried a lot, but I'm still at the stage "trial an
>> error".
>>
>> Greetings
>>
>> Mike
> 
> 


  • Prev by Date: Re: Multiple Shooting Method
  • Next by Date: Re: Extract Integrate values
  • Previous by thread: Re: Debugging Mathematica Code (Mathematica 7)
  • Next by thread: Re: Debugging Mathematica Code (Mathematica 7)