Bug 14814 - Debugger unnecessarily suspends before "if-blocks"
Summary: Debugger unnecessarily suspends before "if-blocks"
Alias: None
Product: R
Classification: Unclassified
Component: Misc (show other bugs)
Version: R-devel (trunk)
Hardware: All All
: P5 normal
Assignee: R-core
Depends on:
Reported: 2012-02-15 13:43 UTC by Stephan Wahlbrink
Modified: 2015-12-14 13:48 UTC (History)
0 users

See Also:

Patch for eval.c adding the proposed change (2.22 KB, application/octet-stream)
2012-02-15 13:43 UTC, Stephan Wahlbrink

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Wahlbrink 2012-02-15 13:43:15 UTC
Created attachment 1269 [details]
Patch for eval.c adding the proposed change


myf <- function() {
    if (1 < 2) {
debug(myf); myf()

The debugger (browser) suspends before the "then"-block "{" and before the print statement.

For blocks in while-loops and for-loops, it suspends only before the first statement inside "{ }", but not before "{ }".  I think this would be handy for if-statements as well.
Comment 1 Brian Ripley 2012-02-21 17:18:21 UTC
'suspends' is confusing here.  This is about steps of the browser in single-step mode (which is what debug uses).

Changed for 2.15.0.
Comment 2 Stephan Wahlbrink 2012-02-21 18:26:43 UTC
Thank you.