mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[snap] Fix vscode debugger attaching to forked proc
Turns out I just forgot to forward `process.env` when forking 😅
`debugger` statements and breakpoints should work with both `--sync` and
`--no-sync` (default) modes
This commit is contained in:
@@ -34,7 +34,9 @@ const childProc = fork(require.resolve("./runner.js"), hideBin(process.argv), {
|
||||
// when we `inherit` stdin.
|
||||
// pipe stdout and stderr so we can silence child process after parent exits
|
||||
stdio: ["pipe", "pipe", "pipe", "ipc"],
|
||||
env: { FORCE_COLOR: "true" },
|
||||
// forward existing env variables, like `NODE_OPTIONS` which VSCode uses to attach
|
||||
// its debugger
|
||||
env: { ...process.env, FORCE_COLOR: "true" },
|
||||
});
|
||||
|
||||
invariant(
|
||||
|
||||
Reference in New Issue
Block a user