Run your application using: `node debug xxx.js` then use the following commands to step-through the code (note: Ctrl+D to exit the debugger)...
`cont` -> continue running
`next` -> step over next statement
`step` -> step into next statement (if possible, otherwise it just steps over)
`out` -> step out of the currently executing function
`backtrace` -> show the current call execution frame or call stack
`repl` -> start the node repl to allow you to view variable values and execute code
`watch(expr)` -> add given expression to the watch list (which is shown whenever you step through anything in the debugger)
This file contains hidden or 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
| "use strict"; | |
| // `f` is assumed to sporadically fail with `TemporaryNetworkError` instances. | |
| // If one of those happens, we want to retry until it doesn't. | |
| // If `f` fails with something else, then we should re-throw: we don't know how to handle that, and it's a | |
| // sign something went wrong. Since `f` is a good promise-returning function, it only ever fulfills or rejects; | |
| // it has no synchronous behavior (e.g. throwing). | |
| function dontGiveUp(f) { | |
| return f().then( | |
| undefined, // pass through success |
NewerOlder