krasimir / kuker

Kick-ass browser extension to debug your apps
https://chrome.google.com/webstore/detail/glgnienmpgmfpkigngkmieconbnkmlcn
MIT License
659 stars 26 forks source link

How to get list of events from Kuker? #8

Open bahmutov opened 6 years ago

bahmutov commented 6 years ago

Hi Krasimir,

Love love love your idea here,

A question: what if in my code (especially from the tests) I want to get the history of events so far? I am thinking when a Cypress test fails grabbing the event history and adding it to the error report!

A little bit related to #7 I think

krasimir commented 6 years ago

Hey,

Yep, there is a way which is not straightforward but I already have an item in my todo list about exporting and importing of Kuker events. So this will be soon available as part of the extension's UI. What you can do for now is:

  1. Use the app and create some Kuker events
  2. Go to debug the extension code (Click the right mouse button on the Kuker interface and choose "Inspect". Then go to the console tab).
  3. Move the focus again on the extension by clicking/selecting something there.
  4. Press "Ctrl + `" (Ctrl + backtick)
  5. This will console log an object that has an events property. Those are your events.
  6. (optionally) Click the right mouse button in the console and choose "Save as" to store the whole output to a file.

P.S. While developing the extension I needed a mock data so get quickly to a state which I am interested in. I used this approach. Of course it is not convenient at all but does the job for the time being. Also have in mind that if you have lots of events the console logging may take a second or two.