Skip to content

What is the best practice to debug and learn about the library code? #1395

Answered by mbostock
yoshikiohshima asked this question in Q&A
Discussion options

You must be logged in to vote

You can put a debugger statement in JS code blocks or in JS components. For example:

```js
debugger;
display(Plot.plot({…}));
```

But, stepping through the client-side is different than what @yoshikiohshima asked for, which is stepping through Framework’s server-side transpilation. For that you would need to use node --inspect.

If you just want to see how the translated JS code, there is very little difference, but you can view source on the preview server and you will see it in the HTML, or you can run the build command and look at the generated HTML.

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@yoshikiohshima
Comment options

@spandl
Comment options

@mbostock
Comment options

@spandl
Comment options

Answer selected by Fil
Comment options

You must be logged in to vote
1 reply
@spandl
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants