Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct Debugging config created for VS Code doesn't match documentation #928

Closed
Yajur-Grover opened this issue Mar 1, 2024 · 3 comments · Fixed by #930
Closed

Direct Debugging config created for VS Code doesn't match documentation #928

Yajur-Grover opened this issue Mar 1, 2024 · 3 comments · Fixed by #930
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@Yajur-Grover
Copy link
Contributor

Yajur-Grover commented Mar 1, 2024

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.

@Yajur-Grover Yajur-Grover added bug Something isn't working documentation Improvements or additions to documentation labels Mar 1, 2024
@chrisglein chrisglein added this to the Next milestone Mar 4, 2024
@chrisglein
Copy link
Member

Related: microsoft/vscode#206581

@Yajur-Grover
Copy link
Contributor Author

Related: microsoft/vscode#206581

Issue posted on the React Native Tools repo detailing direct debugging errors: microsoft/vscode-react-native#2117

jonthysell added a commit that referenced this issue Mar 14, 2024
## Description

This PR updates our javascript debugging docs to reflect the state of
RNW 0.73.

### Why
There are various bugs opened against direct debugging Hermes in RNW,
this updates the docs to reflect the coming deprecation of web
debugging.

Resolves #928 

## Screenshots
N/A

###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/react-native-windows-samples/pull/930)
@jonthysell
Copy link
Contributor

The docs show what you need to set to make it work, not necessarily what (incorrect) config got generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants