google / perfetto

Performance instrumentation and tracing for Android, Linux and Chrome (read-only mirror of https://android.googlesource.com/platform/external/perfetto/)
https://www.perfetto.dev
Apache License 2.0
2.64k stars 330 forks source link

Perfetto incompatible with chrome://inspect #837

Open jdarpinian opened 2 weeks ago

jdarpinian commented 2 weeks ago

If using chrome://inspect to do port forwarding and/or remote inspection of Chrome on a device, Perfetto will fail to record traces on the device with this unhelpful error:

    A WebUSB error occurred
    ✕
    Is adb already running on the host? Run this command and try again.
    > adb kill-server

    For details see b/159048331

At the very least, this error message could be improved for non-googlers. But ideally, it would be able to work simultaneously. If that's not possible, it would be nice at least if Perfetto could do port forwarding itself.

LalitMaganti commented 2 weeks ago

Seems a reasonable request, we'll probably get to it during a fixit.

primiano commented 2 weeks ago

I'm not sure that is really fixable (other than improving the error message). Chroem://inspect uses webusb and takes exclusive access of the USB interface for ADB. Perfetto wants to do the same.

You can't have both at the same time. Not without some quite convoluted work across chrome://inspect and perfetto, which nobody will probably ever get to.