Re: Debugging Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg94681] Re: [mg94654] Debugging Mathematica
- From: John Fultz <jfultz at wolfram.com>
- Date: Sat, 20 Dec 2008 06:20:39 -0500 (EST)
- Reply-to: jfultz at wolfram.com
At this time, there is no way to selectively query the module variable in the front end debugger (possibly there might be in the Mathematica Workbench debugger, which I don't know that much about). If you use Block instead of Module, you can type and evaluate the variable name or any expression containing the variable name to get information about it. Sincerely, John Fultz jfultz at wolfram.com User Interface Group Wolfram Research, Inc. On Fri, 19 Dec 2008 07:23:01 -0500 (EST), Nikolaus Rath wrote: > Hello, > > I have trouble debugging a function that I wrote. The function is of the > form > > f[x_,y_] := Module[{a,b}, ...] > > I am able to set a breakpoint in the function and Mathematica > correctly stops execution. > > However, now I want to inspect the state of some local variables. > Unfortunately some of them have very large contents (~500 000 reals), > so when I open the stack and try to expand the "Local Variables" cell, > the frontend just hangs. > > Is there a way to *selectively* display some of the local variables? > What I would like most is to be able to execute code in the current > stack frame, e.g. if I could simply evaluate a[[1]] in some notebook > to get the first element of the local variable a. Is that possible? > > I am using Mathematica 7. > > Best, > > -Nikolaus > > -- > =C2=BBIt is not worth an intelligent man's time to be in the majority. > By definition, there are already enough people to do that.=C2=AB > -J.H. Hardy > > PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C