p5-plack-debugger
p5-plack-debugger copied to clipboard
Build a console util object
The panel data is actually already stored in JSON in the browser process, if you do this in the console you will find it.
$.grep(plack_debugger.resource._request.data.results, function (x) { return x.title == "Some Title" })[0].result
You can also do the AJAX fetch yourself and process the results.
$.ajax({ global: false, dataType: 'json', url: (Plack.Debugger.$CONFIG.root_url + '/' + Plack.Debugger.$CONFIG.current_request_uid), success: function (d) { console.log($.grep(d.data.results, function (x) { return x.title == "Some Title" })[0].result) } });
Ideally this would be better done with something like:
plack_debugger.console_util.get_results_for_panel("Some Title");
and
plack_debugger.console_util.fetch_results_for_panel("Some Title");
Or some kind of variant of this, you get the idea.