dongwen2896 2018-07-08 15:24
浏览 33

VS代码调试php

I am currently looking into how to be able to sufficiantly debug mostly Php code which has no documentation and which´s developer just left the comp. after making a major release update which of course has 100000 problems. I am supposed to take over but I am somewhat a newby with "complex" IDE´s. I am trying to install VS code with "php debug" extension. I figured out how to solve all the error messages beeing thrown before(download php, adding windows path etc...;) but I am still not able to see anything in the console when executing. E.g When I take out a comma in some line I get an ok respoonse in the "problems" tab which is ok. But I never see anything in "output", "Debug console" or "Terminal" tab. As well as nothing in "Variables", "watch", and "call stack" on the left site of the debug menu of VS code.

I have also not figured out how call for a specific function while settings its entry variables and then see what is beeing called and what is beeing processed and where.

When I start the debugging it seems to just goes through the entire file and intelisense checks for errors but not execute the code.(at least I dont see anything)

The buttons "step over", "step into" and "step out" are also always greyed out. no matter how many breakepoints I set.

Question:

  1. How can I start executing a specific function within a file while seeing input and output vars?

  2. How can I change input vars when calling a specific function?

  3. where can I see the error messages when executing?

Hoping for any pointing to references or any explaination of the process how you do it. I kinda expected this to be easier to figure out

What do I do?:

  1. I open the file and then press f5
  2. in the top the f1 console opens and asks for node.js or php. I click php then it opens a file

    {
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "port": 9000
        },
        {
            "name": "Launch currently open script",
            "type": "php",
            "request": "launch",
            "program": "${file}",
            "cwd": "${fileDirname}",
            "port": 9000
        }
    ]
    

    }

  3. I go back to the file I wanted to execute and press f5 again. The status bar get orange..yehaa

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测