Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

debugging/inspecting in SSR server_dev.js

See original GitHub issue

Hey Lee, I’m looking to debug the server_dev.js process in the node-inspector. In server_dev.js, the childProcess.fork seems the place to put a debug signal. but it doesn’t work. Have you managed to debug a node process that webpack keeps killing and re-spawning?

class ServerDevPlugin {
  apply(compiler) {
    compiler.plugin('done', () => {
      if (this.server) this.server.kill();
      this.server = childProcess.fork(path.resolve(PATHS.dist, 'server_dev.js'), {
        cwd: PATHS.dist,

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

leebensoncommented, Jul 30, 2017

--inspect switch released in

Added to CLI

Upgrade with npm i -g reactql

leebensoncommented, Jul 30, 2017

@lawwantsin - the point of Webpack on the server is not having to make special provisions for your code; it’s implicitly isomorphic.

You can write import someImage from 'src/image.png' or import css from './someSassFile.scss' and know that it’ll work perfectly everywhere – without worrying about server-side file hashing, Zopfli/Brotli compression, considering how CSS classes might match up, etc.

In fact, it’s the reason you can import anything at all.

Taking Webpack out of the equation on the server pushes those considerations into userland - and they’re generally not easy problems to solve.

Of course, you don’t need to use Webpack. You could write your code using require(), avoid importing files relative to the project root, avoid treating images or CSS like local JS code, and handle your own build process via gulpfiles or similar.

But the aim of ReactQL is to avoid complexity, and keep the browser and server (for the most part!) singing from the same sheet without worrying about that stuff.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Debug Server Side Rendering - Bitovi
With SSR, the server renders the entire page and sends it to the browser. ... But this will require a Node.js debugger.
Read more >
Server-Side Rendering Performance: Testing and Debugging ...
Using ssr:inspect to debug with breakpoints. With a simple command, you can use Chrome DevTools to debug the local backend of your server-side...
Read more >
Debug SSR node.js server side VSCode - Stack Overflow
I've lost too many hours trying to debug an SSR react application (the server side). We're building an app from scratch, and it's...
Read more >
Learn How to Debug the Cause of Memory Leak in SSR
Debugging the cause of SSR memory leak in Next.js ... When started with the --inspect switch, you are able to start inspecting client...
Read more >
Advanced Features: Debugging - Next.js
Debug your Next.js app. ... Streaming SSR · React Server ... Launching the Next.js dev server with the --inspect flag will look something...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found