s-news
[Top] [All Lists]

Re: S debugger

To: "Kogan, Clark" <clark.kogan@grizmail.umt.edu>
Subject: Re: S debugger
From: Santosh <santosh2005@gmail.com>
Date: Mon, 2 Jul 2007 19:11:48 -0700
Cc: s-news@lists.biostat.wustl.edu
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Gy7k/YRXiEUaQx8FPyvST8hXgcD70iNKdItuUN9KWEGRZBUHJA3aj41ff9n05IzyTsuvjlCJJcGY6lnwIjVx6o5QPvHzloAnCUHqkn473QeFVjmu5yuvAD3UzYt10MUYzttSUBzhS++WMGUNwdyKKJAG6+dwA5Of4lMk+ULwycg=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=inXhRo/mmkSX9pujR6813B81xmLBTIDewfT6wCMwnU21xmLPn6wtOXLHCrjwVY5D0ABu5SH+MtWhVanX5EDGiA2LpBSeVGwUzG4f5j6+5PZVffzd9PWUEN7Qt7lIdeOFfo87dWM5DFgsMofdUjN6sqVpRJblVrjqPCWzYIj7aao=
In-reply-to: <DCBC3908A14B814E9FF56256125ACD760F8555@MUMMAILVS3.gs.umt.edu>
References: <DCBC3908A14B814E9FF56256125ACD760F8555@MUMMAILVS3.gs.umt.edu>
Hi Clark,
The way I do to get in there is to use the "step" function. step function helps to evaluate the code prior to execution ,including functions. It would also help you enter functions...

After entering functions using "step", "mark" AFTER can help you set breaks.... You should be able to stop at break points even after you come out of the function, during iterative mode..

Hope this helps...

Best,
Santosh

On 7/2/07, Kogan, Clark <clark.kogan@grizmail.umt.edu> wrote:

Hello,
I have a question about the 'mark' command that can be used with the inspect() debugger.
I have S+ 7.0 on a windows xp machine.

Ideally, when I debug a function
>inspect(myfunction(x))

I would like to be able to set a break point at a certain line in the code.

myfunction <- function(y)
{
  line1
  line2
  line3
  line4 #I want to set a breakpoint here
}

The closest command to this seems to be the mark command, which I think sets a breakpoint at a function call.
I tried the following:

myfunction <- function(y)
{
  line1
  line2
  line3
  hello() #I want to set a breakpoint here
}
hello <- function(z)
{
  z
}

And then when debugging I typed:
d>mark hello()

I got the error:
cannot find function hello()

Any ideas?
Thanks!
Clark Kogan

--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>