duanqian2368 2017-01-17 01:28
浏览 352

在Windows 10上使用Visual Studio代码进行PHP调试

I am having difficulty in setting up Debugger to work using Visual studio code in Windows 10 I followed steps mentioned here. https://blogs.msdn.microsoft.com/nicktrog/2016/02/11/configuring-visual-studio-code-for-php-development/

Validated the phpinfo() here: https://xdebug.org/wizard.php when i click on Start Debug icon, it shows the stepover bar and nothing happens although i have breakpoints in the code.

Am i missing something...or is there a way to see what's going on.

test.php:

<?php
$var1 = "Hello";
function test1() {
   echo "Hi";
}
test1();

?>

settings.json:

"php.validate.executablePath":"C:\\Program Files (x86)\\IIS Express\\PHP\\v7.1.0\\php.exe",
"php.validate.enable": true,
"php.validate.run": "onType"

launch.json:

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

php.info:

[XDebug]
zend_extension = "C:\Program Files (x86)\IIS Express\PHP\v7.1.0\ext\php_xdebug-2.5.0-7.1-vc14-nts-x86_64.dll"
xdebug.remote_enable = 1
xdebug.remote_autostart = 0
  • 写回答

1条回答 默认 最新

  • dporu02280 2017-03-20 07:43
    关注

    Should work better with

    xdebug.remote_autostart = 1
    
    评论

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧