-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc(llnode): add user journey guide #587
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1 +1,57 @@ | ||
// TODO | ||
# Using `llnode` for post-mortem debugging | ||
|
||
You probably already experienced crashes that only happen in production. | ||
You'd like to reproduce it and step through instructions, | ||
but it will imply stopping your Node.js process and certainly | ||
degrade the user experience. | ||
|
||
The purpose of this guide is to help you to find route causes | ||
of your application crashes in production. | ||
|
||
Before jumping into the code, let's clarify a few core concepts | ||
that will helps you to go thoroughly through this tutorial. | ||
|
||
## Concepts | ||
|
||
> ✋ If you familliar with the concept of core dump and `lldb`, | ||
> please skip this chapter, and start [here](#explore-your-firstcore-dump) | ||
|
||
### What is a core dump? | ||
### What is `lldb`? | ||
|
||
## Explore your first core dump | ||
|
||
### Setup | ||
|
||
Open your favorite editor and copy-paste this piece of code. | ||
|
||
```js | ||
// script.js | ||
|
||
const log = { | ||
info: (message) => console.log("Info: " + message), | ||
error: (message) => console.log("Error: " + message) | ||
} | ||
|
||
log.debug("This should crash"); | ||
``` | ||
|
||
### Create a code dump | ||
### Use lldb | ||
### Something is missing in the frames | ||
|
||
## Reveal invisible frames with `llnode` | ||
|
||
This is not ideal for dealing with these blank lines. | ||
Let's see how `llnode` can help us. | ||
|
||
### Install `llnode` plugin | ||
### Explore missing traces (`v8 bt`) | ||
|
||
## Beyond the backtrace | ||
|
||
Revealing Javascript frames is not the only capacity of `llnode`. | ||
|
||
### Inspect framces (`v8 i`) | ||
### Explore objects (`v8 findjsobjects` / `v8 findjsinstances`) | ||
### Find object references (`v8 findrefs`) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch