Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add human-readable device name to
/json[/list]
endpoint (#921)
Summary: This is a proposal to add a human-readable reference to each inspector entries/pages. ### Context I've been experimenting with adding Hermes inspector support to [`vscode-expo`](https://github.com/expo/vscode-expo#readme) by reusing the existing [`vscode-js-debug`](https://github.com/microsoft/vscode-js-debug) tooling. Unfortunately, this method of debugging only supports a single target. When multiple devices are connected, we have to ask the user to select one. Currently, there is no way to differentiate devices. In my case, I have both an Android and iOS device, which I simultaneously use to test things. By adding a human-readable reference, such as `deviceName`, we can ask the user which device they would like to use. ### Does this break the `/json[/list]` endpoint? I've tested this locally, and it doesn't seem to break anything. Note, we already deviate a bit [from the original spec](https://chromedevtools.github.io/devtools-protocol/#get-json-or-jsonlist) with the `vm` property. Pull Request resolved: #921 Test Plan: - Start metro - Connect a device - Open `http://localhost:8081/json`, and check if `deviceName` matches the expected name. Reviewed By: huntie Differential Revision: D42925209 Pulled By: robhogan fbshipit-source-id: 6f2d782a424105f4ea48bd2fddae018e67209fc9
- Loading branch information