ManuelHentschel / vscDebugger

(Partial) Implementation of the Debug Adapter Protocol for R
https://manuelhentschel.github.io/vscDebugger/
MIT License
90 stars 14 forks source link

Weird Error when debugging mlr3oml #174

Closed sebffischer closed 2 years ago

sebffischer commented 3 years ago

Describe the bug Debugging mlr3oml does not work but gives the error that is printed indefinitely:

Error in `[[.R6`(list, entry) : 
  R6 class RootNode/MetaNode/Node/R6 does not have slot 'variablesReference'!
8: `[[.R6`(list, entry)
7: list[[entry]]
6: lget(self, "variablesReference", 0)
5: session$rootNode$findChildNode(list(findBy = "varRef", varRef = varRef))
4: variablesRequest(response, args, request)
3: .vsc.dispatchRequest(obj)
2: .vsc.handleJson(json)
1: vscDebugger::.vsc.listenForJSON(timeout = -1)

To Reproduce Steps to reproduce the behavior:

  1. Clone mlr3oml into ~/
  2. Open mlr3oml as a project in VSCode
  3. Start "Debug R-Package".
  4. The error as shown above arises and is printed indefinitely.

Your Launch config Default configurations for both cases, i.e. "Debug R-Package".

Expected behavior I expect to not get the error message and be able to debug the package.

Actual behavior The error message, as shown above, is printed indefinitely in the Debug Console.

Desktop (please complete the following information):

Additional context The above-described procedure works for other packages. Also only running __load_all() works for mlr3oml__.

sebffischer commented 3 years ago

I think I figured out why this happens. It seems that the whole package is being loaded with load_all() with the default helpers = TRUE. In this specific case, loading the helpers causes an issue. It would be appreciated if this could be specified in the settings.

ManuelHentschel commented 3 years ago

Does https://github.com/ManuelHentschel/vscDebugger/commit/ce8f2489ecc45750a1142af5fb202c5e6a651448 change anything?

sebffischer commented 2 years ago

Sorry, I forgot to answer and switched to neovim shortly after.