Skip to content

Commit

Permalink
README: Add section about debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mafredri committed Aug 20, 2018
1 parent 4377bef commit bc01c98
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,15 @@ yarn run build
The TypeScript compiler and Webpack will produce `out/phoenix.js` that can be used as Phoenix configuration.

For development, `yarn start` will run Webpack in watch-mode.

## Debugging

In a terminal, run:

```console
$ log stream --process Phoenix
```

Anything logged via logger (`import log from './logger';`) will show up as human friendly output in the terminal. `Phoenix.log` can also be used, but it only supports strings, much of the heavy lifting is already done by logger to create a similar experience to `console.log` in the browser.

You can also read about [Attaching to Web Inspector for Debugging](https://github.com/kasper/phoenix/wiki/Attaching-to-Web-Inspector-for-Debugging) in the Phoenix wiki. This gives access to true `console.log` and ability to use `debugger` statements in your code.

0 comments on commit bc01c98

Please sign in to comment.