Description Usage Arguments Value Author(s) See Also Examples
Prepare a function for debugging and set a breakpoint
1 |
func_name |
name for function. Must be of type character |
line_number |
line number where to set the breakpoint |
condition |
a condition to evaluate for conditional breakpoint |
Logical. TRUE if the breakpoint was set, FALSE if it wasn't
Ronen Kimchi
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | bar <- function(a)
{
if (a < 0)
cat("a < 0\n")
else
cat("a >= 0\n")
return(a)
}
foo <- function(x,y)
{
tmp <- bar(x - y)
return(tmp)
}
## Not run: idbg.bp("foo")
# call foo to enter the debugger
# in the debugger type h to see the help
# use n or enter to step over
# use s to step into bar
## Not run: foo(2,3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.