Last active
August 29, 2015 14:07
-
-
Save subbuss/5d2dfbab74911b04c36f to your computer and use it in GitHub Desktop.
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
[subbu@earth tests] node parse --trace=help | |
Tracing | |
------- | |
- With one or more comma-separated flags, traces those specific phases | |
- Supported flags: | |
* peg : shows tokens emitted by tokenizer | |
* sync:1 : shows tokens flowing through the post-tokenizer Sync Token Transform Manager | |
* async:2 : shows tokens flowing through the Async Token Transform Manager | |
* sync:3 : shows tokens flowing through the post-expansion Sync Token Transform Manager | |
* tsp : shows tokens flowing through the TokenStreamPatcher (useful to see in-order token stream) | |
* list : shows actions of the list handler | |
* pre : shows actions of the pre handler | |
* p-wrap : shows actions of the paragraph wrapper | |
* html : shows tokens that are sent to the HTML tree builder | |
* dsr : shows dsr computation on the DOM | |
* tplwrap : traces template wrapping code (currently only range overlap/nest/merge code) | |
* wts : trace actions of the regular wikitext serializer | |
* selser : trace actions of the selective serializer | |
* domdiff : trace actions of the DOM diffing code | |
* wt-escape : debug wikitext-escaping | |
--debug enables tracing of all the above phases except Token Transform Managers | |
Examples: | |
$ node parse --trace pre,p-wrap,html < foo | |
$ node parse --trace sync:3,dsr < foo | |
Debugging | |
--------- | |
- With one or more comma-separated flags, provides more verbose tracing than the equivalent trace flag | |
- Supported flags: | |
* pre : shows actions of the pre handler | |
* wts : trace actions of the regular wikitext serializer | |
* selser : trace actions of the selective serializer | |
####################################################################################################### | |
[subbu@earth tests] node parse --dump=help | |
Dumping state | |
------------- | |
- Dumps state at different points of execution | |
- DOM dumps are always doc.outerHTML | |
- Supported flags: | |
* tplsrc : dumps preprocessed template source that will be tokenized | |
* dom:post-builder : dumps DOM returned by HTML builder | |
* dom:pre-dsr : dumps DOM prior to computing DSR | |
* dom:post-dsr : dumps DOM after computing DSR | |
* dom:pre-encap : dumps DOM before template encapsulation | |
* dom:post-encap : dumps DOM after template encapsulation | |
* dom:post-dom-diff : in selective serialization, dumps DOM after running dom diff | |
--debug dumps state at these different stages | |
Examples: | |
$ node parse --dump dom:post-builder,dom:pre-dsr,dom:pre-encap < foo | |
$ node parse --trace html --dump dom:pre-encap < foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment