[ESS] Debug mode puts point in the wrong buffer

Marius Hofert marius.hofert at math.ethz.ch
Thu Jun 20 21:54:22 CEST 2013


On Thu, Jun 20, 2013 at 10:33 AM, Vitalie Spinu <spinuvit at gmail.com> wrote:
>  >> Marius Hofert <marius.hofert at math.ethz.ch>
>  >> on Wed, 19 Jun 2013 23:55:10 +0200 wrote:
>
> [...]
>
>
>  > 1) ... M-C and means M-S-c (although this can never be clear since the
>  > keys on a keybard are already shown as uppercase letters whereas they
>  > are lowercase if not pressed with shift... but okay). Why not write
>  > M-S-c? at least it's then clear that M-C does *not* mean 'meta +
>  > control'.
>
>  > 2) ... C-M-S-c for 'cont-multi' ... here, the 'Shift' is denoted by
>  > 'S', probably to avoid the confusion with C-M-C, where the first 'C'
>  > is 'Control' and the second 'C'.
>
> The keys are generated automatically. This is how emacs writes them. By
> convention C always precedes M, so M-C cannot mean Alt+Control, which
> are meaningless anyways.
>
>  > Okay, I now got it to work, but only because I put the point back in
>  > the *R* buffer... that's exactly the behavior I don't understand. Why
>  > do I always have to switch in the other buffer (back go *R*) first
>  > before I can enter debug commands (be it either RET or M-N [indeed,
>  > RET is even simpler in this case :-)]).
>
> It should work from the R script buffer. Unless that script buffer is
> not associated with the process. It looks like a bug to me.
>
> Can you try the following. Create a new test.R and put the following
> into it:
>
>
>    foo <- function(){
>        browser()
>        1 + 2
>    }
>
>
>    foo()
>
> Evaluate the function with C-c C-c. Then foo(). Do you see visual
> debugger jumping and highlighting the line 1+2?
>

... If I use 'C-c C-c' to evaluate the function, then the line is
highlight. However, if I use C-RET to evaluate each everything 'step
by step', then debug mode is on (red DB), but the line '1+2' is *not
highlighted*. That's certainly a bug, right? The behavior shouldn't
depend on the way the same code is evaluated.

Cheers,

Marius

>
>
> Now M-N (from test.R) should advance the debugger to exit.
>
>     Vitalie
>



More information about the ESS-help mailing list