I try to find a way to debug through R studio, however all the solutions I can find do not really work.
1.) CTRL+enter: works but does not go through every iteration of the loop but only once.
2.) Adding "browser()" stops at that point but I am not able to go from there line by line (neither "n" nor "F10" works?
Any idea what the issue could be?
Put the code/script inside a function:
function_to_debug <- function(data){
a = 2+3
return(a)
}
Then run this in R console:
debug(function_to_debug)
The debugger starts and you can step through each line of the function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With