react-native-windows-samples
react-native-windows-samples copied to clipboard
Direct Debugging config created for VS Code doesn't match documentation
Page url
https://microsoft.github.io/react-native-windows/docs/debugging-javascript#direct-debugging
Problem Description
When setting up JavaScript direct debugging for VS Code (Hermes), the output in the launch.json file when adding a 'Node.js' or 'Node.js: Attach' configuration does not match the expected output in the documentation, as shown below:
Node.js:
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}\\index.js"
}
Node.js (Attach):
{
"name": "Attach",
"port": 9229,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
}
Expected output:
{
"name": "Attach",
"port": 8081,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"outFiles": [
"${workspaceFolder}/**/*"
],
"type": "node"
}
After adding the config, I just replaced it with what the expected config was according to the documentation, but not sure why there is a difference in output.
Related: https://github.com/microsoft/vscode/issues/206581
Related: microsoft/vscode#206581
Issue posted on the React Native Tools repo detailing direct debugging errors: https://github.com/microsoft/vscode-react-native/issues/2117
The docs show what you need to set to make it work, not necessarily what (incorrect) config got generated.