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

Running and debugging PHP with vscode #169

Merged
merged 1 commit into from Nov 7, 2018

Conversation

Projects
None yet
3 participants
@vizeke
Copy link
Contributor

vizeke commented Oct 31, 2018

Just some extra info on how to launch a PHP application directly from vscode with the debugger attached.

@msftclas

This comment has been minimized.

Copy link

msftclas commented Oct 31, 2018

CLA assistant check
All CLA requirements met.

@auchenberg

This comment has been minimized.

Copy link
Collaborator

auchenberg commented Nov 5, 2018

@vizeke I'm not sure what scenario you are covering with these additions?

{
    "name": "Listen for XDebug",
    "type": "php",
    "request": "launch",
    "port": 9000
},

seems to be launching php but waiting? Is this supposed to be an attach config?

@vizeke

This comment has been minimized.

Copy link
Contributor

vizeke commented Nov 7, 2018

With the default config, following the recipe today, you have to start the php server trough the command line and then start the debugger with vscode.

With this config you can run and debug with vscode, theres no need to start the server trough the command line:

{
    "name": "Launch server",
    "type": "php",
    "request": "launch",
    "program": "${workspaceRoot}/path/to/server.php",
    "runtimeExecutable": "php",
    "runtimeArgs": [
        "-dzend_extension=path/to/xdebug",
        "-S",
        "0.0.0.0:8000"
    ],
    "cwd": "${workspaceRoot}",
    "port": 9000
}

@auchenberg auchenberg merged commit 40ce4ba into Microsoft:master Nov 7, 2018

1 check passed

license/cla All CLA requirements met.
Details

@auchenberg auchenberg added this to the November 2018 milestone Dec 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment