Skip to content

Debugger does not stop in breakpoints in blade files. #986

Open
@jsantos42

Description

@jsantos42

Problem: Debugger does not stop in breakpoints in blade files.

PHPStorm can do this if you set the path to bladecache in Settings->PHP->Debug->Debug->Templates->Blade Debug

Is there a way to implement this? Or maybe my config is missing something:

return {
  "mfussenegger/nvim-dap",
  optional = true,
  opts = function()
    local dap = require("dap")
    local path = require("mason-registry").get_package("php-debug-adapter"):get_install_path()
    dap.adapters.php = {
      type = "executable",
      command = "node",
      args = { path .. "/extension/out/phpDebug.js" },
    }
    dap.configurations.php = {
      {
        name = "Debug",
        type = "php",
        request = "launch",
        port = 9003,
        pathMappings = {
          ["/usr/src/wordpress/wp-content"] = "${workspaceFolder}",
          ["/usr/src/wordpress"] = "${workspaceFolder}/.wordpress-src",
          ["/tmp/bladecache"] = "${workspaceFolder}/bladecache",
          ["/usr/src/wordpress/wp-config.php"] = "${workspaceFolder}/.docker/config/wp-config.php",
          -- ["/usr/src/wordpress/wp-content/bladecache"] = "${workspaceFolder}/bladecache",
        },
        xdebugSettings = { show_hidden = 1, max_children = 100, max_data = 1024, max_depth = 3 },
      },
    }
  end,
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions