forked from hqphat/coursera-r-programming
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8866762
commit 92c7126
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |