Vscode-php-debug: Setting up with vagrant help

Created on 15 Jun 2016  路  5Comments  路  Source: xdebug/vscode-php-debug

I'm trying to set up xdebug with vagrant but am confused on how to start.

question

All 5 comments

Sorry, I never used Vagrant, I don't even know what it is. Maybe you can get help from other users on Gitter or StackOverflow.

my xdebug is running on a virtual machine that is deployed by vagrant and my php.ini looks like this

xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=10.0.2.2
xdebug.remote_port=9000
xdebug.remote_autostart=1

I fixed it by adding

xdebug.remote_log=/var/log/xdebug.log
to my php.ini and adding

"log": true to my launch.json

@c0cky I set this up with log true and I finally get a launch response in the debug console :

Response {
  seq: 0,
  type: 'response',
  request_seq: 2,
  command: 'launch',
  success: true }

but that is it, not able to step into anything or watch variables
what are your launch.json settings?

log and remote_log don't have anything to do with this. You need to set localSourceRoot to ${workspaceRoot} and serverSourceRoot to the equivalent path on your Vagrant VM.

Was this page helpful?
0 / 5 - 0 ratings