Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

browser() ?


trace subsumes browser, it's much more flexible and can be applied to library code without editing it.


Is there a way to trace an attribute to a function? I couldn't find one, but curious if it exists. I seemed blocked by the fact that trace seemed to expect a name as a character string. Some functions in base R have functions in their attributes which modify their behavior (e.g. selfStart). I ended up just copying the whole code locally and then naming it, but for a better interactive experience I really wish there was a way to pass a function object as I can with debug.


trace is great for shimming in your own code to an existing function, but it’s not an interactive debugging tool.


It sure is. If you set the second argument to browser you can step through any function.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: