s-news
[Top] [All Lists]

S debugger

To: <s-news@lists.biostat.wustl.edu>
Subject: S debugger
From: "Kogan, Clark" <clark.kogan@grizmail.umt.edu>
Date: Mon, 2 Jul 2007 10:40:44 -0600
Thread-index: Ace8x7wjzIDrXUc0Rl2ReGEZfyZJcg==
Thread-topic: S debugger
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
 

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