Is it possible to insert a browser statement (or equivalent) in your R code with opencpu and when the ajax or plot call is made the R session (or Rstudio session) from which the opencpu server instance is running will stop and allow debugging?
Asked
Active
Viewed 270 times
1 Answers
0
No, I don't think that would make sense. The OpenCPU server exposes an HTTP API to call R functions. If you want to debug the R function, just call it locally in R. That way you an use all your usually debugging tools.
Once the function works as expected you can call it remotely through the OpenCPU API, and it will give the same result.
Perhaps you can give an example of the type of problem that you're trying to debug, maybe I can give some advice on your workflow.

Jeroen Ooms
- 31,998
- 35
- 134
- 207
-
I guess the main problem is validating the input... which can be done on the client side with JS browsing. – Theodore Van Rooy Jan 20 '14 at 23:14
-
And then also a workflow thing. While writing the app, there starts to be some overhead in the make change -> Build -> ocpu$browse('my/app/url') . It would be nice to work on the look/feel of the client side JS/HTML, debug that with the webkit tools. And then do similar on the R side... and when finally done do the final compilation. – Theodore Van Rooy Jan 20 '14 at 23:19