What is the best practice to debug and learn about the library code? #1395
Replies: 2 comments 4 replies
-
Me too, I would like to step through JS/TS code, but in markdown files, this doesn't seem to be possible and I haven't managed either in stepping through JS/TS modules. |
Beta Was this translation helpful? Give feedback.
-
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 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 |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am interested in, say, how the translated JS code looks. I'd put a break point in, say,
src/javascript/parse.ts
orsrc/javascript/transpile.ts
and check how nodes and resulting text are transformed. I simply tried to putdebugger
at the top of a function in parse.ts but it does not hit in the browser. I put console.log() and the output goes to the command line.How do people do this kind of exploration?
Beta Was this translation helpful? Give feedback.
All reactions