browser.default(frame=<<see below>>, catch=T, parent=<<see below>>, message=<<see below>>, prompt="b> ", readonly=F)
Assignment expressions are worth considering, also. If browser is called without an explicit frame argument, as in the example, assignments will take place in the calling function's frame. Thus, browser can be used to try out revisions in real time, without editing the function. A similar use can be made of the case of an explicit frame; assignments will change the frame, as it appears inside browser, so that modifications in the situation as captured in frame (for example, through dump.frames and debugger) can be tried out interactively. Both these versions can be helpful in software design and debugging.
The quit signal (usually the character control-backslash) will exit from the browser, and from the whole expression that generated the call to the browser, returning to the S-PLUS prompt level. (Don't type two control-backslash characters (one if catch=FALSE) since this will terminate your session with S-PLUS.)
This is the default method for the generic function browser.
The inspect function now provides a more general interactive debugging environment, including browsing and tracing, together with most of the functionality of the debugger function.
trace(foo, browser) # call browser on entering foo options(interrupt=browser) myfun <- function(x,y) { # lots of computing browser() #now check things just before the moment of truth .C("myroutine",x,y,w) }