c9 / core

Cloud9 Core - Part of the Cloud9 SDK for Plugin Development https://c9.github.io/core/ https://c9.io
Other
2.56k stars 922 forks source link

Xdebug - C9 SDK local installation #400

Open postadelmaga opened 7 years ago

postadelmaga commented 7 years ago

I have installed C9 sdk on my LAMP but I cannot manage to make xdebug work with it. (I am trying to debug a php web app.)

Here Xdebug Config:

zend_extension=xdebug.so
xdebug.remote_enable=on
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
#xdebug.remote_handler=dbgp
idekey=cloud9ide 
remote_mode=req
nightwing commented 7 years ago

You need a runner for the debugger to be activated, but you can set command to cat, or tail a log file if you prefer to not run the project from cloud9.

postadelmaga commented 7 years ago

We have indeed solved creating a runner with cat.

Anyway we noted that in order to work you also have to enable xdebug for php cli, maybe you can write this note some where in the xdebug plugin readme

In case somebody need this runner works:

{
    "cmd": [ "cat"  ],
    "selector": "^.*\\.(php|phar)$",
    "info": "Enabling xdebug",
    "working_dir": "$project_path",
    "debugger": "xdebug",
    "debugport": 9000,
    "env": {
        "XDEBUG_CONFIG": "\"idekey=cloud9ide remote_host=localhost remote_port=9000 remote_mode=req\""
    }
}
postadelmaga commented 7 years ago

Is the above runner correct ? Sometime it Xdebug just stop to work without any reason .... anything I can try ?