... another suggestion: If you debug a function foo() in main.R, a buffer (say, foo.R) showing the source of foo() is opened. When leaving debug mode via 'Q', I most certainly would like to leave foo.R and go back to main.R. Since foo.R is automatically opened on debug, I'd expect it to be closed automatically as well. Cheers, Marius