2

Task: Goal is to get all the functions which are triggered by installed extensions.

Expected Output: Javascript function calls, similar to what appears in timeline panel.

Description: As mentioned above I want to get the timeline data from chrome. For that I am using timeline feature of chrome remote debugging protocol to get timeline data using chrome javascript debugger API. I am starting a debuger with following code:

chrome.debugger.attach({ tabId: tabid }, version, onAttach.bind(null,tabid); chrome.debugger.sendCommand({ tabId: tabid }, "Tracing.start");

However when I ran this code I get an error which states that timeline is deprecated, use tracing. Although official documentation haven't mentioned that timeline is deprecated. I have also tried tracing which removes the error but still no event is captured. Is there any issue of flags?


After reading code of Chrome Apps & Extensions Developer Tool, I found out that chrome.activityLogPrivate API to log all the events by different extensions. However, I am not able to run it by calling inside my extension, it remains undefined. I am not able to find documentation of this extension also.

Xan
  • 74,770
  • 16
  • 179
  • 206
CryptoKitty
  • 654
  • 4
  • 20

1 Answers1

1

Stable 1.1 Debugging protocol has no "Tracing", however, the "tip of the tree" docs say exactly this:

Timeline domain is deprecated. Please use Tracing instead.

It should be a warning only, since:

As of Google Chrome 31, we commit to supporting v1.1. All subsequent 1.* versions of the protocol are going to be backwards compatible with 1.1. Our protocol backwards compatibility commitment is:

  • No commands or events are removed from the protocol.
  • No required parameters are added to the commands.
  • No required parameters are removed from command responses or events.

So your commands should work normally.


chrome.activityLogPrivate API is what it says on the tin - private. It is only enabled for specific whitelisted extensions in Chrome's code, and it's not publicly documented.

So no, you cannot use it unless you use hacks like this one, which are not guaranteed to work.

Community
  • 1
  • 1
Xan
  • 74,770
  • 16
  • 179
  • 206