microsoft / vscode-react-native

VSCode extension for React Native - supports debugging and editor integration
https://marketplace.visualstudio.com/items?itemName=vsmobile.vscode-react-native
Other
2.63k stars 267 forks source link

[Bug] Doesn't support monorepos and relies on package.json too much #2207

Closed phazei closed 1 month ago

phazei commented 2 months ago

When I try to launch the debugger, I get this error: "An error occurred while launching the application. Invalid Version: SemverInvalid"

This is my launch.json:

    {
        "name": "Debug Android Hermes",
        "request": "launch",
        "type": "reactnativedirect",
        "cwd": "${workspaceFolder}/apps/mobile/",
        "platform": "android"
    },

My package.json is in the ${workspaceFolder}, in the mobile folder it only has "react-native": "*" which is generated by NX. Also, my package name in my package json is "mobile" but when it tried to launch once it gave an error about loading "com.mobile.MainApplication". But our namespace is "com.ourCompany.ourApp.MainApplication". Those items should be configurable inside the launch.json.

EzioLi01 commented 2 months ago

Hey @phazei , thanks for reaching us. Is it possible to share a demo to help us repro this issue and do further investigation? I have tried on a basic monorepo project and it's working well.

Also could you please try to launch your application using npx react-native run-android, and using attach request to debug you app?

EzioLi01 commented 1 month ago

Hey @phazei , do you have any update on this?

EzioLi01 commented 1 month ago

Close this issue since it had no further updates, please renew it or create a new one if you still need help. Thanks!

phazei commented 1 month ago

Hey, I'd like to create a demo for this, and I will, but we have a big crunch so I won't have time for a couple weeks.

EzioLi01 commented 1 month ago

Thanks so much, any time you need help please feel free to let me know!