search

Home  >  Q&A  >  body text

javascript - Server side rendering How to debug?

When doing react front-end development, as we all know, you can use console.log to easily view information in the browser's devtools.

Then the problem comes. When doing react server rendering, console.log is printed in the command line, and detailed information cannot be viewed.

For example, function expression.

How to debug server-side rendering? Are there any tools? Thanks

The answer has been found: Redirect the terminal output of node.js to the browser console

PHPzPHPz2806 days ago669

reply all(1)I'll reply

  • PHPz

    PHPz2017-05-19 10:42:37

    What language server is used for server-side rendering?

    react的服务端渲染是需要一个js的上下文的,理论上 ruby 或者其他语言都是可以做到在自己的环境中起一个jscontext,但是总归没有直接用nodeIt’s so refreshing.

    so, if you use node那该console.log的地方还是会直接lognode serverlog, if you use other languages ​​​​since it is the context of js, of course the log will also be typed

    reply
    0
  • Cancelreply