Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mac-cain13/xdebug-helper-for-chrome
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: BrianGilbert/xdebug-helper-for-firefox
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Aug 19, 2017

  1. Updates to disable unsupported webextension api’s. Updates to rename …

    …repo to xdebug helper for firefox.
    BrianGilbert committed Aug 19, 2017
    Copy the full SHA
    c30230d View commit details
  2. Update Readme.md

    BrianGilbert authored Aug 19, 2017
    Copy the full SHA
    fa5f307 View commit details
  3. Copy the full SHA
    5a15f45 View commit details
  4. Updated version

    BrianGilbert committed Aug 19, 2017
    Copy the full SHA
    2548111 View commit details

Commits on Aug 22, 2017

  1. Copy the full SHA
    4c5fd3d View commit details

Commits on Aug 23, 2017

  1. Updated so that options can only be enabled on web pages, updated ico…

    …ns, moved extension icon to address bar.
    BrianGilbert committed Aug 23, 2017
    Copy the full SHA
    60a7643 View commit details
  2. Copy the full SHA
    078516b View commit details

Commits on Aug 25, 2017

  1. Copy the full SHA
    5ecd4e5 View commit details

Commits on Oct 5, 2017

  1. #3 Fixed tab.url.match logic.

    Fixed
    BrianGilbert committed Oct 5, 2017
    Copy the full SHA
    7256250 View commit details

Commits on May 7, 2020

  1. Set SameSite=Strict cookies

    This is needed because newer browsers such as Firefox 76 are starting to require this. See also https://bugs.xdebug.org/1782
    derickr authored May 7, 2020
    Copy the full SHA
    8c0c2ac View commit details

Commits on May 10, 2020

  1. Merge pull request #19 from derickr/patch-2

    Set SameSite=Strict cookies
    BrianGilbert authored May 10, 2020
    Copy the full SHA
    53f7b9d View commit details
  2. Bump extansion version

    BrianGilbert authored May 10, 2020
    Copy the full SHA
    18f6a30 View commit details
  3. Update manifest.json

    BrianGilbert authored May 10, 2020
    Copy the full SHA
    519cd77 View commit details
  4. Made icons square

    BrianGilbert authored May 10, 2020
    Copy the full SHA
    b59100c View commit details

Commits on Aug 3, 2020

  1. Copy the full SHA
    4be1537 View commit details
  2. Update options.css

    imme-emosol authored Aug 3, 2020
    Copy the full SHA
    307082e View commit details

Commits on Jun 17, 2021

  1. Set SameSite=Lax for the cookie to fix remote debugging after redirec…

    …ts like in OAuth flow
    Seros committed Jun 17, 2021
    Copy the full SHA
    ef9c7b3 View commit details

Commits on Oct 12, 2021

  1. Merge pull request #21 from imme-emosol/patch-1

    Use browser chrome's background color
    BrianGilbert authored Oct 12, 2021
    Copy the full SHA
    ef40619 View commit details
  2. Merge pull request #30 from Seros/fix-samesite

    Set SameSite=Lax for the cookie to fix remote debugging after redirects like in OAuth flow
    BrianGilbert authored Oct 12, 2021
    Copy the full SHA
    2825758 View commit details

Commits on Jun 28, 2022

  1. Copy the full SHA
    f916f56 View commit details

Commits on Jul 11, 2023

  1. Merge pull request #38 from FalkHe/master

    added pitfall hint on missing Icon
    BrianGilbert authored Jul 11, 2023
    Copy the full SHA
    c19bc5f View commit details
  2. Copy the full SHA
    77211f7 View commit details
  3. Copy the full SHA
    98a8706 View commit details

Commits on Jul 19, 2023

  1. Copy the full SHA
    0ec3ffe View commit details
  2. Copy the full SHA
    3232e8e View commit details
  3. Copy the full SHA
    fed59eb View commit details
32 changes: 23 additions & 9 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
XDebug Helper for Google Chrome
===============================
XDebug Helper for Firefox
=========================

Debugging, profiling and tracing PHP code with [Xdebug](http://xdebug.org/) is very powerful, but enabling
Xdebug with cookies or adding POST/GET variables is way too hard. This extension will help you to enable/disable
debugging, profiling and tracing of your PHP-code easily.

It is based on the Chrome extension https://github.com/mac-cain13/xdebug-helper-for-chrome/ with the edits to
remove unsupported webextensions API calls.

Hotkeys
-------
Ctrl+Shift+X (Cmd+Shift+X on Mac) opens the popup.
Ctrl+Shift+X (Cmd+Shift+X on Mac) opens the popup.
Alt+Shift+X toggles the debugging state.

How to install this extension?
------------------------------
**Stable version:** Go to the [Google Chrome Web Store](https://chrome.google.com/webstore/detail/eadndfjplgieldjbigjakmdgkmoaaaoc)
and click "Add to Chrome".
**Stable version:** Go to the [Firefox Addon](https://addons.mozilla.org/en-GB/firefox/addon/xdebug-helper-for-firefox/)
and click "Add to Firefox".

**Development version:** [Download the source from GitHub](https://github.com/mac-cain13/xdebug-helper-for-chrome/archive/master.zip)
and [load the extension into Chrome](http://developer.chrome.com/extensions/getstarted.html#unpacked)
**Development version:** [Download the source from GitHub](https://github.com/BrianGilbert/xdebug-helper-for-firefox/archive/master.zip)
and [load the extension into Firefox](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Temporary_Installation_in_Firefox)
yourself!

Pitfalls
--------
**Xdebug Icon not showing up in Address bar.**

You might need to either allow the extension to run in private mode or enable your browser history.
Disabling the browser history internally turns on the private-mode and disables all plugins that aren't allowed for private mode.

@see [this comment](https://github.com/BrianGilbert/xdebug-helper-for-firefox/issues/33#issuecomment-1168994059) and [that comment](https://bugzilla.mozilla.org/show_bug.cgi?id=1266409#c2)


How do I contribute?
--------------------
A: [Submit issues and ideas](https://github.com/mac-cain13/xdebug-helper-for-chrome/issues)
A: [Submit issues and ideas](https://github.com/BrianGilbert/xdebug-helper-for-firefox/issues)

B: [Submit a pull request](https://help.github.com/articles/using-pull-requests)

@@ -33,11 +46,12 @@ _**Pro-tip:** Make sure to build upon the latest version of the code and keep pu

License
-------
The code of this project is licensed under the [MIT license](https://raw.github.com/mac-cain13/xdebug-helper-for-chrome/master/source/License)
The code of this project is licensed under the [MIT license](https://raw.github.com/BrianGilbert/xdebug-helper-for-firefox/master/source/License)
so you can use it in nearly every project you want to, commercial and non-commercial.

Special thanks
--------------
* [Mathijs Kadijk](http://mathijskadijk.nl/) for creating [Xdebug helper](https://chrome.google.com/webstore/detail/eadndfjplgieldjbigjakmdgkmoaaaoc) for Chrome
* [remailednet](http://blog.remailed.net) for creating the original [XDebug Enabler](https://chrome.google.com/webstore/detail/eippbhbeglgcphcjmpjcjinjamabeoln) for Chrome
* [Guilherme Pim](https://github.com/pimguilherme) for contributing a Manifest v2 version
* [All contributors](https://github.com/wrep/xdebug-helper-for-chrome/graphs/contributors) for taking the time to create a pull request
2 changes: 1 addition & 1 deletion source/License
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012-2015 Mathijs Kadijk - https://github.com/mac-cain13
Copyright (c) 2017 Brian Gilbert - https://github.com/BrianGilbert

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
17 changes: 11 additions & 6 deletions source/background.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab)
{
// Only show icon on http/https pages.
if (!tab.url.match(/^about:|^moz-extension:/)) {
browser.pageAction.show(tab.id);
}

// We only react on a complete load of a http(s) page,
// only then we're sure the content.js is loaded.
if (changeInfo.status !== "complete" || tab.url.indexOf("http") !== 0)
@@ -127,32 +132,32 @@ function updateIcon(status, tabId)
{
// Figure the correct title/image with the given state
var title = "Debugging, profiling & tracing disabled",
image = "images/bug-gray.png";
image = "images/bug-outline.svg";

if (status == 1)
{
title = "Debugging enabled";
image = "images/bug.png";
image = "images/bug-green.svg";
}
else if (status == 2)
{
title = "Profiling enabled";
image = "images/clock.png";
image = "images/clock.svg";
}
else if (status == 3)
{
title = "Tracing enabled";
image = "images/script.png";
image = "images/script.svg";
}

// Update title
chrome.browserAction.setTitle({
chrome.pageAction.setTitle({
tabId: tabId,
title: title
});

// Update image
chrome.browserAction.setIcon({
chrome.pageAction.setIcon({
tabId: tabId,
path: image
});
2 changes: 1 addition & 1 deletion source/content.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ var xdebug = (function() {
{
var exp = new Date();
exp.setTime(exp.getTime() + (days * 24 * 60 * 60 * 1000));
document.cookie = name + "=" + value + "; expires=" + exp.toGMTString() + "; path=/";
document.cookie = name + "=" + value + "; expires=" + exp.toGMTString() + "; path=/; SameSite=Lax";
}

// Get the content in a cookie
Binary file added source/fonts/MaterialIcons-Regular.eot
Binary file not shown.
Binary file added source/fonts/MaterialIcons-Regular.ttf
Binary file not shown.
Binary file added source/fonts/MaterialIcons-Regular.woff
Binary file not shown.
Binary file added source/fonts/MaterialIcons-Regular.woff2
Binary file not shown.
Binary file removed source/images/bug-gray.png
Binary file not shown.
14 changes: 14 additions & 0 deletions source/images/bug-green.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions source/images/bug-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed source/images/bug.png
Binary file not shown.
Binary file removed source/images/clock.png
Binary file not shown.
7 changes: 7 additions & 0 deletions source/images/clock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed source/images/script.png
Binary file not shown.
14 changes: 14 additions & 0 deletions source/images/script.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading