NativeScript / NativeScript/nativescript-cli

Open Chrome when using Chrome DevTools for debugging

Open
#3,085 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debug feature
Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the tns debug android and tns debug ios --chrome entry points, then review PR 3071 for how the DevTools URL is generated. Done means Chrome opens the URL, CI can print it without launching Chrome, --no-client remains respected, executable names can be configured, and LiveSync URL changes are handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, ios, javascript
Domain
cli, devtools, mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.