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

[Feature] Support direct debugging when using Chakra in VS Code #1371

Closed
harinikmsft opened this issue Aug 13, 2020 · 5 comments
Closed

[Feature] Support direct debugging when using Chakra in VS Code #1371

harinikmsft opened this issue Aug 13, 2020 · 5 comments

Comments

@harinikmsft
Copy link

This issue is copied over from an issue filed in the RNW repo

🚀 Feature request

You can use VS Code for direct debugging when using V8/Hermes, but not for Chakra. This issue is for adding support.

What scenarios will this solve?

The only way to do direct debugging with Chakra is through Visual Studio. Adding support for VS Code would allow developers to pick the tool that better suits their needs.

@RedMickey
Copy link
Contributor

Hello @harinikmsft, @EricCornelson.
We started to investigate how we can attach to a RNW app running in direct debugging mode. We used React Native projects versions 0.62.2 and 0.63.2 with the corresponding versions of RNW 0.62.5 and 0.63.0-preview.4. We launched projects using Visual Studio and then enabled direct debugging and also via the npx react-native run-windows --direct-debugging 9229 command.
Under the hood our extension uses js-debug extension for debugging. We tried to attach to a RNW app using pwa-node scenarios with the application process ID and direct debugging port (e. g. 9229). Both of them didn't work for us:

  • js-debug cannot attach to the process via its ID, since it doesn't recognize it as a Node.js process and here we get an error.
  • When we were trying to use direct debugging port, it wasn't possible to reach http://localhost:9229 and retrieve an inspector URL. Also the packager endpoint returns just an empty array in case we send the /json request.

It seems that VS uses some other method or additional processing to attach to an application process via its PID.
Could you please tell us if we correctly use the direct debugging port or we something missed and there is a way to retrieve an inspector URL? Could you please also tell us, if it's possible, who we can contact to ask some details about the implementation of attachment to a process in Visual Studio?

@RedMickey
Copy link
Contributor

@harinikmsft, just a friendly ping on this.
Could you please tell us some more info about the direct debugging port? We'd like to know how we can use it, since it's not possible to get any info over the following http requests:

We also found out that the default inspector URL for debugging Chakra Core is ws://127.0.0.1:9229/runtime1, but it seems that it also doesn't work in this case.

@RedMickey
Copy link
Contributor

Hi @harinikmsft, do you have a chance to look at this?

@harinikmsft
Copy link
Author

Hi @RedMickey - sorry for not responding earlier. Since we are working on bringing up Hermes across all platforms including Windows in the next version update with direct debugging, we can deprioritize this ask for Chakra Core direct debugging and focus instead on making the Hermes experience better. Thanks for following up.

@RedMickey RedMickey removed their assignment Mar 30, 2022
@Samriel
Copy link
Contributor

Samriel commented Jun 21, 2022

@harinikmsft we are closing this issue until you come back to working on that task. Please, reopen it when the right moment comes.

@Samriel Samriel closed this as completed Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants