dgkf / debugadapter

Debug Adapter Protocol implementation for R
GNU General Public License v3.0
18 stars 2 forks source link

Debug prompt enhancements #22

Closed dgkf closed 2 months ago

dgkf commented 2 months ago

A huge refactor of the browser()-based debugging.

Using browser() was convenient because breakpoints could be set directly in functions. However, R does modify those functions altering line numbers and possibly introducing other non-function code. It also doesn't include expression-level sys.call() information the same way debug() does.

So now I've fully swapped over to using debug(). This means I need to step through the function manually to stop at breakpoints, but it is much more faithful to the actual R code and gives line-level information.

One downside is that there's a huge amount of noise from base R debug output, but I think that's more manageable than the browser() downsides.