npm run buildnpm run watchThis watches the files and rebuilds, but we still have to restart the tui.
console.log and console.error calls go to a log file
In src/index.js when we instantiate the screen,
const screen = blessed.screen({
autoPadding: true,
smartCSR: true,
title: 'Terminal Devtools',
sendFocus: true,
dockBorders: true,
autoPadding: true,
log: './log', //'/dev/ttys004',
ignoreLocked: ['C-c']
})
console.log = screen.log.bind(screen)
console.error = screen.log.bind(screen, 'ERROR: ')Notice the comment on the log property, running
tty in a terminal will give you it's tty device.
You can open a new terminal and set log to its
tty file to output logs directly to a secondary terminal.
Logger middleware in store/create.js is commented out, this
will output every action and corresponding state change to the
log. It's commented out because it's a firehose.
Use --trace-debug-json to see debugger API request/response JSON.
$ node --debug-brk --trace-debug-json somefile.jsWe can use protocol logging whilst interacting with node inspector to see how node inspector performs certain functions - this can be useful to supplement the protocol docs and bring clarity to implementation details.
First run node-inspector as a service (important to do this first)
$ node-inspectorIn another terminal, run node on a file along with debug-brk and trace-debug-json
$ node --debug-brk --trace-debug-json somefile.jsNow open the node inspector url http://127.0.0.1:8080/?ws=127.0.0.1:8080&port=5858 and start using features.
Easy way to format the debugger request/response JSON output, copy it then:
$ npm i -g JSONStream
$ pbpaste | JSONStream | pbcopy- Every component is pure - no components handle state, ever (e.g. no
setState)- Each component is a function not a class, life cycle methods can added using
react-functionalif needed
- Each component is a function not a class, life cycle methods can added using
- Redux is responsible for a central store
- container components hook up redux state to child dumb components
- container components currently map to tab screens (e.g. the
Sourcescontainer) is composed of all the panels in the sources tab, and likewise passes down relevant state and action methods to the components
- container components currently map to tab screens (e.g. the
- dumb components (e.g. non-containers) should not know anything about the app, they take props output JSX for rendering.
- If it can't be done declaratively, don't fall back to using
refs- instead patch and PR against react-blessed so that it is declarative (e.g. Yomguithereal/react-blessed#40, Yomguithereal/react-blessed#36, Yomguithereal/react-blessed#38, Yomguithereal/react-blessed#37, <Yomguithereal/react-blessed#35) - Avoid
refsif at all possible, only use them for edge cases to control ui behaviour (e.g supporting a keypress on an element that calls a method on another element)
- refactored from original to es6
- the
debugger-apimodule lacks some fundamental functionality currently using yadc alongside debugger-api to make raw callsdebugger-apihas been swapped out foryadc
- v8 protocol documented here: https://chromium.googlesource.com/external/github.com/v8/v8.wiki/+/84541b3cd196e8d5026f6b988d6d0627bd6c4954/debugger_protocol.md
known issue with scrolling, sticks to bottom- fixed but new issue with scroll jumping depending on various factors
- scope
- currently only displays local scope
- global, closure, with and catch scopes are implemented at the debug interaction level, we just need to do some ui/ux work/thought to display the different scope areas
- currently non-interactive
- e.g. we can't interact with it like a tree and see it's props
- some work around this is necessary,
- need to do a lookup on props when an object is interacted with
- need to integrate tree component also to support ui interaction
- missing advanced features such as
thiscontext- proto lookup
- prototype lookup
- getter/setter dynamic lookups
- none of these are worth implementing until we have ability to explore properties
- currently only displays local scope
- support for other ports
- highlight breakpoints in editor
- optimize react to blessed rendering life cycle
- debug/log output customization via environment vars
- settings/help dialog when
?key is pressed - support for devtools short cuts (e.g. ctrl+' for step etc.)
- console/repl
- console tab
- examples/demos
- tests
fix editor sticking to bottom issue- fixed, but new remaining scroll issue
- improve selection indicator (partial yellow border)
- maybe paint a border over the top
- panel resizing
- show/hide navigator
- show hide callstack column
- implement "accordian" behaviour for callstack-breakpoints-scope
- e.g. expand the currently selected and contract the others
- step in
- step out
- pause on uncaught exception / pause on exception
- de-activate/re-activate all breakpoints without removing
- line numbers
- configurable layouts (preferences)
- navigator improvements
- navigation tree
- option to hide native
- branch master to v2 branch
- on master, carve away incompleted pieces (networking, profiling, console tabs)
- release as v1
- continue work on v2
- networking
- profiling