Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

adding some node lib ID in stacks#2868

Merged
jasonLaster merged 1 commit into
firefox-devtools:masterfrom
Sequoia:master
May 12, 2017
Merged

adding some node lib ID in stacks#2868
jasonLaster merged 1 commit into
firefox-devtools:masterfrom
Sequoia:master

Conversation

@Sequoia
Copy link
Copy Markdown
Contributor

@Sequoia Sequoia commented May 10, 2017

Summary of Changes

  • Added call stack grouping for Node internals, Express and Pug
  • Added SVGs for same
  • Added a note about optimization/cleanup

Test Plan

Baseline: basic express app:

npm install express-generator -g
express test-app   # create an application
cd test-app        
npm install

# replace jade with pug (new jade)
npm rm -S jade
npm i -S pug

A couple more Jade => pug changes:

  1. replace app.set('view engine', 'jade'); with app.set('view engine', 'pug'); in app.js
  2. move views/*.jade views/*.pug

Then

  • load the app in debugger.html
  • set breakpoint in node_modules/pug/lib/index.js line 211
  • hit / (index) on the express server
  • Observe that the call stack is collapsed & grouped by library

Screenshots

debug-stack-libs

Add'l notes

  • The express logo isn't great for a square
  • This is primarily a proof-of-concept/demoware. There are lots and lots of popular node modules, this captures one of the most popular (express) and an associated library (pug). The purpose here is to demonstrate that this is possible & show the utility
  • the Node internal bits are not "proof of concept", that bit is definitely useful/ready-to-ship.

@jasonLaster
Copy link
Copy Markdown
Contributor

jasonLaster commented May 10, 2017

Very cool @Sequoia! Could you add some screenshots/GIFs?

@Sequoia
Copy link
Copy Markdown
Contributor Author

Sequoia commented May 11, 2017

@jasonLaster I'm happy to! What would you like to see beyond what's there now?

@Sequoia
Copy link
Copy Markdown
Contributor Author

Sequoia commented May 12, 2017

Before

screen shot 2017-05-12 at 10 42 39 am

After

screen shot 2017-05-12 at 10 43 42 am

Expanded

screen shot 2017-05-12 at 10 43 25 am

Copy link
Copy Markdown
Contributor

@jasonLaster jasonLaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Very cool

@jasonLaster jasonLaster merged commit 3e995eb into firefox-devtools:master May 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants