search for: setbreakpoint

Displaying 20 results from an estimated 28 matches for "setbreakpoint".

2011 Dec 06
2
help! what's wrong with setBreakpoint
Hi all, I am in the middle of debugging which is stopped using "browser()"... in myfile.R at around line #25. I was then stuck in a big loop which I want to escape and stop the program at the line after the big loop. In the debugging mode, I used Browse[2]> setBreakpoint("myfile.R#38") I then typed "c" and "ENTER", thinking that it will continue to execute until when it comes across line #38 and then stop there... But it didn't work - it continued the execution until the end of the function, right at the line "return(results...
2023 Feb 18
1
Adding support for S7 to base R
On 18/02/2023 9:51 a.m., Duncan Murdoch wrote: > One more comment: > > The utils::setBreakpoint() function should be updated to be able to set > breakpoints in S7 methods, or a substitute function should be added to > the S7 package. > > RStudio 2022.12.0+353 (not sure if that's the latest) also needs to be > taught how to do that, since it doesn't seem to use setBreak...
2023 Feb 18
1
Adding support for S7 to base R
One more comment: The utils::setBreakpoint() function should be updated to be able to set breakpoints in S7 methods, or a substitute function should be added to the S7 package. RStudio 2022.12.0+353 (not sure if that's the latest) also needs to be taught how to do that, since it doesn't seem to use setBreakpoint. Duncan Murdoch
2012 Oct 09
4
Modern Symbolic debugger for R programmes?
I think I am whistling in the wind, but is there a modern symbolic debugger for R programmes? I am working through some one else's code, thousands of lines, that has the occasional bug in it, and a lot in my understanding of it. I cannot make setBreakpoint or findLineNum work. I get "No source refs found.". I am starting to loose my mind! A debugger where I could set breakpoints with a little more granularity than the function level and a little more accessible than the trace function. What I ideally want is GDB for R. Does that exist...
2024 Apr 12
1
Debugging functions defined (locally) inside another functions
...browser() ... } and it will break very similarly to what happens if you have set debug(g). Another possibility if you have the source but don't want to edit it is to use trace. Suppose that the definition of g is in source.R at lines 100 to 120. Then you can run setBreakpoint("source.R#101") to set a breakpoint via trace() just before line 101 runs. trace() has lots of options; it can just print things, or call browser(), etc. They are available in setBreakpoint(). If you are executing code from a package and you don't have the source handy it's...
2023 Mar 13
1
Adding support for S7 to base R
...and I think the language as a whole would benefit greatly from having a single standard. -Ezra On Sat, Feb 18, 2023 at 12:38?PM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 18/02/2023 9:51 a.m., Duncan Murdoch wrote: > > One more comment: > > > > The utils::setBreakpoint() function should be updated to be able to set > > breakpoints in S7 methods, or a substitute function should be added to > > the S7 package. > > > > RStudio 2022.12.0+353 (not sure if that's the latest) also needs to be > > taught how to do that, since it doesn...
2024 Apr 12
3
Debugging functions defined (locally) inside another functions
Hi all, I am trying to debug an error of a function g defined and used inside another function f of a package. So I have f <- function(whatever){ ... g <- function(whatever2){ ... } ... } If I wanted to debug some thing directly inside f I would do debug(f). But this does not go inside g code. On the other hand, debug(g) does not work as g is not a defined function in the
2012 Feb 21
2
Debugging using RStudio or any other R editor
Hello, I am using RStudio and have trouble finding out the problematic line in the presence of a bug. Could I view the line NUMBER which contains a bug? Is there any R editor able to do it? Thanks, Miao [[alternative HTML version deleted]]
2010 Oct 29
2
how to debug (mtrace) a function defined inside a function?
Hi, everyone. I am using a fair amount of closures in my code. Problem i am experiencing is i cannot figure out how to mtrace functions defined within a function. There must be some way to name such function for mtrace to see it and let me step into it. For example, say i have code mymodel<-function(){ data<-numeric(0) build<-function(){ data<<-1 } m<-list()
2011 Apr 06
1
executing from .R source file in the src package
Can I run R code straight from R src (.R) file instead of .rdb/.rdx? I of course tried simply unzipping tar.gz in the R_LIBS directory but R complains with "not a valid installed package". Real issue: I am very new to R and all, so this could be something basic. I'm trying to use ess-tracebug (Emacs front-end to trace/browser et al). It works great when I trace functions in .R
2023 Feb 17
2
Adding support for S7 to base R
Dear R-devel, We are pleased to inform you that the R Consortium OOP Working Group has been making progress on the S7 (formerly named R7) package and are preparing to submit it to CRAN. The S7 package is a new OOP system designed to be a successor to S3 and S4. As part of that effort, the group has identified a minimal set of narrow changes to base R that would allow S7 to exist as a CRAN
2009 Oct 01
1
debugging S4 methods
Hi all, Does anyone know how to debug S4 methods? In my case I want to find an error in the specc-function of the kernlab-package. As this seems to be a S4-method the normal S3 debugging can't be applied apparently (e.g. debug(s3function.someclass)). So in my case > debug(specc:kernlab) seems only to debug the generic-function: > specc:kernlab function (x, ...)
2010 Jul 23
1
Syntax Highlightning and Editor for Linux
Hello to the community . First post :) I would like to ask you which text editor do you use in Linux and how did you setup the syntax highlightning? one more question is it possible to debug any program in R by inserting breakpoints? I would like to thank you in advance for your help Best Regards Alex -- View this message in context:
2011 Jun 03
1
debug R code
Hi List, I have a question regarding debug R code. I know I can use debug(fuction_name) and when code runs to that point, it will go to debugger. My question is inside debugger, how to stop a code at a specified line. For example, in C (gdb or dbx debugger) I can run "stop at 123" (stop at line 123) or 'b 123' (break at line 123). Is there any similar commend in R
2014 Oct 02
3
debuggingState() analogous to tracingState() ?
...asily. So I'd consider setting up debuggingState() in a way that it can simultaneously turn off and on both tracing and debugging. > I don't have much of an opinion on these questions. I've never used the > tracingState() function, though I use trace() all the time (via > setBreakpoint()). You might want to consult people who write debugger > front-ends. which I am now doing: I'm including ESS-core, Jonathan (RStudio) and Tobias (StatET) which Duncan mentioned as being interested and having asked for better debugging support functionality in the past, such as >...
2011 Aug 24
2
debugging functions in R
Hi, I am not sure if this is the right list to ask this question (though I did not find a more appropriate one). I've started using R a month ago, and small scripts work fine. However, when I start writing more complex code, it gets messy. 1. Is there any way to debug "normally", with breakpoints? 2. I am using the Eclipse plugin (StatET), and tried JGR(). Is there an IDE that
2009 Dec 07
4
Announce: edtdbg, integrating R's debug() with your text editor
I've just developed edtdbg, a small package that integrates R's debug() with one's text editor. Excerpt from the README file: Goal The debug() function in R is primitive. My goal was to make it more usable by integrating it with one's text editor. Hence I wrote the package here, edtdbg. Its features include: * As one steps from line to line of code
2009 Dec 14
0
R 2.10.1 is released
...d match positions in bytes (not characters) in an MBCS locale if 'pattern' was a single byte. [g]sub(fixed = TRUE) with a single-byte pattern could conceivably have matched part of a multibyte character in a non-UTF-8 MBCS. o findLineNum() and setBreakpoint() would sometimes fail if the specified file was not in the current directory. o Package tcltk's demo(tkdensity) was broken in 2.9.0 when demo() was changed to set par(ask = TRUE). o gsub() with backrefs could fail on extremely long strings (hundreds of tho...
2009 Dec 14
0
R 2.10.1 is released
...d match positions in bytes (not characters) in an MBCS locale if 'pattern' was a single byte. [g]sub(fixed = TRUE) with a single-byte pattern could conceivably have matched part of a multibyte character in a non-UTF-8 MBCS. o findLineNum() and setBreakpoint() would sometimes fail if the specified file was not in the current directory. o Package tcltk's demo(tkdensity) was broken in 2.9.0 when demo() was changed to set par(ask = TRUE). o gsub() with backrefs could fail on extremely long strings (hundreds of tho...
2010 Feb 23
3
Best style to organize code, namespaces
Hi all, I'm hoping someone could tell me what best practices are as far as keeping programs organized in R. In most languages, I like to keep things organized by writing small functions. So, suppose I want to write a function that would require helper functions or would just be too big to write in one piece. Below are three ways to do this: ################### Style 1 (C-style)