Receive debugging information alongside XMLHttpRequests.

Latest Version

Version
1.3
Update
May 16, 2018
Size
666KiB
Developer
Category
Users
26
Rating
0 ★
Manifest Version
2
Web Store Status
Languages Support
English
See more
Permissions
WebRequest
WebRequestBlocking
Tabs
Http://*/*
Https://*/*
See more

DebugR Extension

Server code (example is php, but the extension is language agnostic):

if (isset($_SERVER['HTTP_DEBUGR'])) { // Only send headers when DebugR is enabled
// Send a message alongside the request.
header('DebugR: '.base64_encode('Hello DebugR'));
// Append a unique label to send multiple messages.
header('DebugR-my-first-label: '.base64_encode('Moarr information'));
}
?>

Client via javascript:

window.addEventListener('message', function (e) {
if (e.data.debugR) {
console.log(e.data);
}
}, false);
document.documentElement.setAttribute('data-debugR'); // Signal the extension that the eventlistener is active.

Using debugr.js helper:


Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx",\t"name": "DebugR",\t"version": "1.3",\t"manifest_version": 2,\t"description": "Receive debugging information alongside XMLHttpRequests.",\t"icons": {\t\t"16": "img/16.png",\t\t"128": "img/128.png"\t},\t"background": {\t\t"scripts": ["js/debugr-Daemon.js"]\t},\t"content_scripts": [{\t\t"matches": ["http://*/*", "https://*/*"],\t\t"js": ["js/debugr-forwarder.js"],\t\t"run_at": "document_start"\t}],\t"permissions": [\t\t"webRequest",\t\t"webRequestBlocking",\t\t"tabs",\t\t"http://*/*",\t\t"https://*/*"\t]}
Read more