Skip to content

Open Chrome when using Chrome DevTools for debugging #3085

Open
@rosen-vladimirov

Description

@rosen-vladimirov

Currently tns debug android and tns debug ios --chrome prepare the project, run it on specified device and prints a URL which should be opened in Chrome browser.
Instead the commands should open Chrome directly and load a specified URL.

The current implementation prints the URL as it is unable to open it in Chrome. However, the changes applied in this PR allow us to generate a URL to https://chrome-devtools-frontend.appspot.com/. This URL can be safely opened in Chrome directly from CLI.

Things to consider during implementation:

  • For testability, we should have an easy way to print the URL and do not open Chrome. This will be useful in CI.
  • Visual Studio Code Extension does not need to open Chrome, so ensure --no-client option is respected.
  • Chrome executable has different names on each OS. Also the Canary release has another name. Ensure the users have an easy way to set the name, specific to their system.
  • During debug operation, CLI LiveSyncs changes on device. This may produce different URL (the port may change), so ensure we open the URL again. In case the port is not changed, just inform the user to reconnect DevTools in the already opened tab.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions