简体   繁体   中英

Debugging PHP in VS Code - "skipFiles"?

I'm trying to debug a website in Visual Studio Code (with XDEBUG installed in Chrome). It works fine but it annoys me that I have to walk through all the files (like scripts running through databases etc.)

I saw that it was possible to skip certain files with "skipFiles" in the launch.json file, but it looks like this is only for debugging Node.js, it also says that "Property skipFiles is not allowed".

    {
  // 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,
      "skipFiles": [
        "auto_prepend.php",
        "application_top.php",
        "database.php"
      ]
    },
    {
      "name": "Launch currently open script",
      "type": "php",
      "request": "launch",
      "program": "${file}",
      "cwd": "${fileDirname}",
      "port": 9000
    }    
  ]
}

Is there some way to skip files during debugging in VS Code?

OK, now I feel silly ;-) You can use the F10 (Step Over) to not step out of the file. Maybe someone has the same question, he can read this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM