How do I get Xdebug to work on Heroku?


Nino Škopac

I just pushed a new deployment to a staging instance on Heroku which failed and now my site has a 500 error.

composer.json

{
    "license": "proprietary",
    "require": {
        "php": ">=5.5.16",
        "aws/aws-sdk-php": "2.*",
        "ext-memcached": "*",
        "ext-apcu": "*",
        "ext-gd": "*",
        "ext-gettext": "*",
        "ext-mbstring": "*",
        "ext-soap": "*",
        "ext-mysql": "*",
        "ext-xdebug": ">=2.4.0"
    },
    "require-dev": {
      "heroku/heroku-buildpack-php": "*"
    }
}

New PHP code:

// STARTS DEBUG
xdebug_start_function_monitor(['session_start']);

register_shutdown_function(function() {
    var_dump(xdebug_get_monitored_functions(), ini_get('session.auto_start'));
});
// ENDS DEBUG

Heroku build log:

-----> PHP app detected
-----> Bootstrapping...
-----> Installing platform packages...
       - php (5.5.38)
       - ext-gd (bundled with php)
       - ext-gettext (bundled with php)
       - ext-mbstring (bundled with php)
       - ext-mysql (bundled with php)
       - ext-soap (bundled with php)
       - ext-apcu (4.0.11)
       - ext-memcached (2.2.0)
       - apache (2.4.20)
       - nginx (1.8.1)
 !     WARNING: Your 'composer.lock' is not up to date with the latest
       changes in 'composer.json'. To ensure you are not getting stale
       dependencies, run 'composer update' on your machine and commit
       any changes to Git before pushing again.
-----> Installing dependencies...
       Composer version 1.2.2 2016-11-03 17:43:15
       Loading composer repositories with package information
       Installing dependencies from lock file
       Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
         - Installing symfony/event-dispatcher (v2.6.1)
           Loading from cache

         - Installing guzzle/guzzle (v3.9.2)
           Loading from cache

         - Installing aws/aws-sdk-php (2.7.12)
           Loading from cache

       Generating optimized autoload files
-----> Preparing runtime environment...
-----> Checking for additional extensions to install...
       - New Relic detected, installed ext-newrelic
-----> Discovering process types
       Procfile declares types -> web
-----> Compressing...
       Done: 112.1M
-----> Launching...
       Released v792
       https://XXX.herokuapp.com/ deployed to Heroku

As far as I can see from the build log, the reason it fails is because Xdebug is not installed even though I specified it in composer.json.

How to install Xdebug on Heroku?

Chris

It seems Heroku doesn't support Xdebug. Heroku's documentation provides a list of six extensions :

  • Three lists for PHP 5.5 and 5.6:
    • Built-in extensions that are automatically enabled
    • Built-in extensions can be enabled bycomposer.json
    • 3rd party extensions that can be enabled bycomposer.json
  • Three corresponding lists for PHP 7

None of them list Xdebug.

Related


How do I get Xdebug to work on Heroku?

Nino Škopac I just pushed a new deployment to a staging instance on Heroku which failed and now my site has a 500 error. composer.json { "license": "proprietary", "require": { "php": ">=5.5.16", "aws/aws-sdk-php": "2.*", "ext-me

How do I get Xdebug to work on Heroku?

Nino Škopac I just pushed a new deployment to a staging instance on Heroku which failed and now my site has a 500 error. composer.json { "license": "proprietary", "require": { "php": ">=5.5.16", "aws/aws-sdk-php": "2.*", "ext-me

How do I get Xdebug to work on Heroku?

Nino Škopac I just pushed a new deployment to a staging instance on Heroku which failed and now my site has a 500 error. composer.json { "license": "proprietary", "require": { "php": ">=5.5.16", "aws/aws-sdk-php": "2.*", "ext-me

How do I get Xdebug to work on Heroku?

Nino Škopac I just pushed a new deployment to a staging instance on Heroku which failed and now my site has a 500 error. composer.json { "license": "proprietary", "require": { "php": ">=5.5.16", "aws/aws-sdk-php": "2.*", "ext-me

How do I adjust Redis settings to work with Heroku-redis?

Jay Chou I have several setup configurations with some kind of Redis backend in them and they are all different. django-channels requires this: # REDIS BACKEND redis_host = os.environ.get('REDIS_HOST', 'localhost') # Channel layer definitions # http://channels

How do I adjust Redis settings to work with Heroku-redis?

Jay Chou I have several setup configurations with some kind of Redis backend in them and they are all different. django-channels requires this: # REDIS BACKEND redis_host = os.environ.get('REDIS_HOST', 'localhost') # Channel layer definitions # http://channels

How do I adjust Redis settings to work with Heroku-redis?

Jay Chou I have several setup configurations with some kind of Redis backend in them and they are all different. django-channels requires this: # REDIS BACKEND redis_host = os.environ.get('REDIS_HOST', 'localhost') # Channel layer definitions # http://channels

How do I get @ParametersAreNonnullByDefault to work?

good: I've made several attempts to get the package annotation @ParametersAreNonnullByDefault to work for me in a maven project without success. Can someone share a link to a minimal/example Maven project? I'm talking about letting the findbugs processor imple

How do I get AssImp to work?

light spark I've been trying to do this for about a week now, and still nothing works. I'm building a .dll (UNDONE Engine .dll) that depends on Assimp to load the model. The .dll compiles and links perfectly, but when I try to use it for some applications I ge

How do I get Mockito to work in androidTest

Isaro How can I mock a class I wrote in a test? Here is my test code: import android.support.test.runner.AndroidJUnit4; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.MockitoAnnotat

How do I get pyinstaller to work on Ubuntu?

microphone I'm using Ubuntu 16 and have installed Python 3.5, also installed pip3, and installed PyInstaller using pip3. I can't run PyInstaller. Whenever I enter pyinstaller in the terminal, I get the following error? do i have to add the path? If so, what sh

How do I get "Observable.of([]);" to work?

rose cleaner What is the correct expression and import Observable.of([]);. import { of } from 'rxjs';doesn't work for me. Martin As of RxJS 6, you should import all "create" observables directly from it 'rxjs'(assuming path mappings are set up when bundling th

How do I get the click catcher to work?

Excellent SP I'm trying to create a simple click catcher, if you click .image-classjavascript it will get the href from another element with the class name .btnand send it to the destination. Although I keep getting errors on lines 7 and 10 that undefined is n

How do I get AssImp to work?

light spark I've been trying to do this for about a week now, and still nothing works. I'm building a .dll (UNDONE Engine .dll) that depends on Assimp to load the model. The .dll compiles and links perfectly, but when I try to use it for some applications I ge

How do I get my torrents to work?

Aelo-74 I'm still new to Ruby/Rails and need your help to make sure the seed is good before running the command.rails db:seed Here is my seed: require 'faker' puts "Creating 10 fake user heros..." 10.times do user = User.create!( username: Faker::DcComi

How do I get pygame collision to work

Crowley I'm making a copy of a flying bird and can't get the collision mechanism to work. Currently, I'm trying to use, .coliderect()but I'm not 100% sure how. Here are two classes. I want the program to do something, or just do something print('x')when the bi

How do I get jQuery to work with me?

Denislav Karagizov I am making an accordion. Watch a guy on youtube do this and write everything his way and it works on his video but not on my computer. Here's what I do (yes, I do declare the HTML at the beginning, and yes, I have the HTML turned on and off

How do I get Tomboy Sync to work?

Jared Kay So after a fresh install of 12.04, I can't get my Tomboy to sync now. I can't get close to 100 important notes right now because "Notes" has also been removed from "Ubuntu One". When I try to "sync" my notes, I get the error "sync failed". Does anyon

How do I get @ParametersAreNonnullByDefault to work?

good: I've made several attempts to get the package annotation @ParametersAreNonnullByDefault to work for me in a maven project without success. Can someone share a link to a minimal/example Maven project? I'm talking about letting the findbugs processor imple

How do I get VBS files to work?

stub When I try to batch create vbs file, the line is not showing in vbs file echo WScript.Sleep 2000 : Objshell.Run "taskkill /f /im cmd.exe", 0 >> 2.vbs What do I need to escape or make the vbs file runnable? Thanks! Hack I created a new batch code to make l

How do I get these queries to work together?

Ryan The query asks to find sets of courses whose combination covers all the knowledge/skills one lacks in pursuit of pos_code. The set of courses considered will not exceed three courses. If more than one course set is found, list the course sets (and their c

How do I get VBS files to work?

stub When I try to batch create vbs file, the line is not showing in vbs file echo WScript.Sleep 2000 : Objshell.Run "taskkill /f /im cmd.exe", 0 >> 2.vbs What do I need to escape or make the vbs file runnable? Thanks! Hack I created a new batch code to make l

How do I get pywinauto to work in the background?

List I would like to use pywinauto in the background to avoid interfering with my work. I need to stop all work as automation starts. How can I make pywinauto run silently in the background? Vasily Ryabov It's not always possible to do everything silently. Som

How do I get the clicked() function to work?

TheCodedMaster cube I'm working with the Coding Train Coding Challenge, Challenge #6: Mitosis. I'm stuck on the part where one of the cell clicks should be detected. If you put this into a web browser, you'll see what I mean - it says it , and it says it quick

How do I get my torrents to work?

Aelo-74 I'm still new to Ruby/Rails and need your help to make sure the seed is good before running the command.rails db:seed Here is my seed: require 'faker' puts "Creating 10 fake user heros..." 10.times do user = User.create!( username: Faker::DcComi

How do I get the sensor applet to work?

OK I used to have lm-sensorsit and it sensors-appletworked fine on Ubuntu 11.04. I just updated to Ubuntu 11.10 and lm-sensorsit's installed, but it doesn't seem to exist in the repositories anymore. Is there a way to keep it working?sensors-applet Mahelita In