Skip to content

browser() behaviour different with ess-remote than otherwise #1265

@aramirezreyes

Description

@aramirezreyes

Hi!

My versions:
Emacs 29.1 (also observed it on 28) for macOS.
R 4.0.3 (linux)
Ess: 20230807.1422

I am observing that the browser exits apparently randomly and I cannot pinpoint all the situations but I here provide one. I guess this could be considered a support request as I assume it is something on my side, although it sounds similar to #1081 .

I log in into a remote computer via tramp. I then start a shel (M-x shell), launch R 4.0.3 and run M-x ess-remote.

Then I do this:

test1 <- function() {
  print("Entering function")
  a <- 1
  browser()
  b <- 2
  d <- a + b
  return("Exiting function")
}

test1()

If then do the following sequence on the shell containing the R process I observe:

> test1()
[1] "Entering function"
Called from: test1()
Browse[1]> a
[1] 1
Browse[2]> b
[1] 2
Browse[2]> d
[1] 3
Browse[2]> d
Error: object 'd' not found
> 

First, the browser went down one level, and then it exited on an error.

When launching R from my terminal without involving emacs, I observe the following:

test1 <- function() {
   print("Entering function")
   a <- 1
   browser()
   b <- 2
   d <- a + b
   return("Exiting function")
 }
> test1()
[1] "Entering function"
Called from: test1()
Browse[1]> a
[1] 1
Browse[1]> b
Error in test1() : object 'b' not found
Browse[1]> d
Error in test1() : object 'd' not found
Browse[1]> d
Error in test1() : object 'd' not found
Browse[1]> 

So the browser does not descend into Browse[2], nor it exits on error, so it seems to be more resilient. Is there something I am doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions