Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to make custom runner to listen 9000 port? #236

Closed
belovanton opened this issue Jan 19, 2016 · 5 comments

Comments

@belovanton
Copy link

commented Jan 19, 2016

I want make runner to listen 9000 port for external xdebug. Any way to do this?

@nightwing

This comment has been minimized.

Copy link
Member

commented Jan 19, 2016

Use debugport.
A runner that uses xdebug would look something like

{
    "cmd": [
        "php",
        "${debug?-d}", "${debug?xdebug.remote_enable=1}",
        "$file",
        "$args"
    ],
    "selector": "^.*\\.(php|phar)$",
    "info": "Running PHP script $file",
    "working_dir": "$project_path",
    "debugger": "xdebug",
    "debugport": 9000,
    "env": {
        "XDEBUG_CONFIG": "\"idekey=cloud9ide remote_host=localhost remote_port=9000 remote_mode=req\""
    }
}

if you don't need to start the process, you can replace "cmd" with [ "sleep", 20000 ] or ["cat"]

But the debugger itself listens on "127.0.0.1" which might be a problem https://github.com/c9/c9.ide.run.debug.xdebug/blob/master/netproxy.js#L24

@belovanton

This comment has been minimized.

Copy link
Author

commented Jan 19, 2016

Thank u for your answer. Any way to make * instead 127.0.0.1?

@nightwing

This comment has been minimized.

Copy link
Member

commented Jan 20, 2016

I'll add support for "debughost": "....", similar to debugport

@belovanton

This comment has been minimized.

Copy link
Author

commented Jan 20, 2016

Ok, thank u I checked your trick with runner and only way I can make it work was php file with sleep(20000). For some reason sleep in cmd doesnt work.

@nightwing nightwing closed this Jan 22, 2016

@nightwing

This comment has been minimized.

Copy link
Member

commented Jan 22, 2016

added in c9/c9.ide.run.debug.xdebug@a1b39e0

strange that cmd didn't work

{
    "cmd" : ["sleep", "1000"],

works both on windows and linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.