Skip to content

Commit

Permalink
Update CONTRIBUTING.md
Browse files Browse the repository at this point in the history
Adding debugging help
  • Loading branch information
jasonwilliams authored Jun 30, 2019
1 parent 28774ff commit b8c7e93
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ If you don't already have Rust installed rustup is the recommended tool to use.

Then simply clone this project and `cargo build`

### Debugging

You can see the output of tokens by adding a `dbg!(&tokens);` here:
https://github.com/jasonwilliams/boa/blob/master/src/lib/lib.rs#L31

This is useful to know if the tokens are in the right order, or any unexpected tokens are appearing.

The parser's expression tree can be viewed by adding `dbg!(&expr)` here:
https://github.com/jasonwilliams/boa/blob/master/src/lib/lib.rs#L34

To get a full backtrace you will need to set the environment variable `RUST_BACKTRACE=1`


### Web Assembly

If you want to develop on the web assembly side you can run yarn serve then go to http://localhost:8080
Expand Down

0 comments on commit b8c7e93

Please sign in to comment.