debugging with rstudio while running testthat tests

198 views
Skip to first unread message

Gregory Jefferis

unread,
Jan 5, 2014, 1:30:23 PM1/5/14
to rdev...@googlegroups.com
Hello,

I'm not sure if I'm missing something obvious, but how can I have breakpoints set in rstudio honoured when I use devtools::test to run testthat tests. Breakpoints seem to be ignored during tests. My current workaround is to insert an explicit browser() call into the source code when I want to debug a function call triggered by a test – or copy/paste the test code into the console.

Many thanks,

Greg.

--
Gregory Jefferis, PhD
Division of Neurobiology
MRC Laboratory of Molecular Biology
Francis Crick Avenue
Cambridge Biomedical Campus
Cambridge, CB2 OQH, UK

http://www2.mrc-lmb.cam.ac.uk/group-leaders/h-to-m/g-jefferis
http://www.neuroscience.cam.ac.uk/directory/profile.php?gsxej2
http://flybrain.stanford.edu

Hadley Wickham

unread,
Jan 7, 2014, 4:18:29 PM1/7/14
to Gregory Jefferis, rdev...@googlegroups.com
Hi Gregory,

This is a great idea, and I've added a note about it at
https://github.com/hadley/testthat/issues/116. I think it should be
relatively straightforward, and I'll look into it the next time I'm
working on testthat.

Hadley
> --
> You received this message because you are subscribed to the Google Groups "devtools" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rdevtools+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



--
http://had.co.nz/
Reply all
Reply to author
Forward
0 new messages