Skip to content

Commit

Permalink
Week 3, lecture 7 notes
Browse files Browse the repository at this point in the history
  • Loading branch information
edj-boston committed Apr 27, 2014
1 parent 8866762 commit 92c7126
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions week-03/lecture-07-debugging-part-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Debugging - Part 2
==================

The primary tools for debugging functions in R are:

* traceback
* Prints out the function call stack after an error occurs
* Does nothing if there's no error
* debug: Flags a function for debug mode which allows you to step through execution of a function in debug mode
* browser
* Suspends the execution of a function wherever it is called and puts the function in debug mode
* trace: allows you to insert debugging code into a function in specific places
* recover: allows you to modify the error behavior so that you can browse the function call stack

These are interactive tools specifically designed to allow you to pick through a function. There's also the more blunt technique of inserting print/cat statements in the function.

0 comments on commit 92c7126

Please sign in to comment.