debugging code inside %dofuture% #693
-
I have set up a call to Running on R 4.3.1 on Linux. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The problem you're experiencing is similar to using The solution is to tell the future framework to capture and output at the same time. This can be done by using: plan(sequential, split = TRUE) The default is See Section 'Interactive debugging' in the blog post 'future 1.20.1 - The Future Just Got a Bit Brighter' on 2020-11-06 for more explanations. |
Beta Was this translation helpful? Give feedback.
-
Perfect, many thanks, sorry I missed that argument. |
Beta Was this translation helpful? Give feedback.
The problem you're experiencing is similar to using
browser()
ordebug()
when calling a function withcapture.output()
. The output produced bybrowser()
anddebug()
is captured, recorded internally, to be outputted at a later time. See HenrikBengtsson/Wishlist-for-R#90 for an example of this problem. This is also what happens internally when parallelizing using futures.The solution is to tell the future framework to capture and output at the same time. This can be done by using:
The default is
split = FALSE
.See Section 'Interactive debugging' in the blog post 'future 1.20.1 - The Future Just Got a Bit Brighter' on 2020-11-06 for more explanations.