Skip to content

debug error - Failed to set breakpoints #141

Open

Description

@francescob

I start my rails app with

RUBY_DEBUG_OPEN=true RUBY_DEBUG_PORT=52203 bin/rails server

then i start the debugger with this configuration:

{ "label": "Attach to Rails server", "adapter": "rdbg", "request": "attach", "cwd": "$ZED_WORKTREE_ROOT", "env": { "RUBY_DEBUG_PORT": "52203" } }

the terminal where i started the server shows that the debugger is connected but in the zed log i see this error:

2025-07-10T10:41:00+02:00 ERROR [project::debugger::session] failed to set breakpoints for "/home/francesco/projects/work/cdss_monitoring/app/controllers/charts_controller.rb": /home/francesco/projects/work/cdss_monitoring/app/controllers/charts_controller.rb is not available 2025-07-10T10:41:00+02:00 ERROR [project::debugger::session] failed to set breakpoints for "/home/francesco/projects/work/cdss_monitoring/app/controllers/concerns/dea_ps_charts_concern.rb": /home/francesco/projects/work/cdss_monitoring/app/controllers/concerns/dea_ps_charts_concern.rb is not available 2025-07-10T10:53:44+02:00 INFO [dap::transport] Debugger closed the connection 2025-07-10T10:53:44+02:00 ERROR [project] client is closed

the path shown points to the correct file

Activity

  1. hazg commented on Jul 12, 2025

    @hazg

    I have the same error

  2. added theissue type on Jul 12, 2025
  3. self-assigned this
    on Jul 12, 2025
  4. vitallium commented on Aug 24, 2025

    @vitallium
    Collaborator

    Hi! Sorry for the late reply, but can you please check if this issue is still happening? I think it was fixed in Zed some time ago. Thanks!

  5. hazg commented on Aug 25, 2025

    @hazg

    same error

    err.json DAP Logs - RPC Messages

    Image
      {
        "label": "🧲 Attach",
        "adapter": "rdbg",
        "request": "attach",
        "cwd": "$ZED_WORKTREE_ROOT",
        "env": {
          "RUBY_DEBUG_PORT": "3001"
        }
      }
    bundle exec rdbg --port 3001 --open --nonstop -- bin/rails s
  6. francescob commented on Aug 25, 2025

    @francescob
    Author

    Hi! Sorry for the late reply, but can you please check if this issue is still happening? I think it was fixed in Zed some time ago. Thanks!

    nope, still seeing the exact same error, i'm on zed latest test release

  7. psbordjukov commented on Jan 14, 2026

    @psbordjukov

    Hitting the same error in a Rails project with RSpec. Here's the debug.json file for a repro:

    [
      {
        "adapter": "rdbg",
        "label": "💎 Attach to rdbg on port 6969",
        "cwd": "$ZED_WORKTREE_ROOT",
        "env": {
          "RUBY_DEBUG_PORT": "6969",
        },
        "request": "attach",
      },
      {
        "adapter": "rdbg",
        "label": "🐞✅ Debug current spec",
        "command": "rspec",
        "args": ["\"$ZED_RELATIVE_FILE:$ZED_ROW\""],
        "cwd": "$ZED_WORKTREE_ROOT",
        "request": "launch",
      },
    ]

    Both configurations fail to set breakpoints with a cryptic 'is not available' error.

    2026-01-14T02:27:14+02:00 INFO  [dap::transport] Debug adapter has connected to TCP server 127.0.0.1:51176
    2026-01-14T02:27:15+02:00 ERROR [project::debugger::session] failed to set breakpoints for "/Users/petko/Projects/X/spec/controllers/x_controller_spec.rb": /Users/petko/Projects/X/spec/controllers/x_controller_spec.rb is not available
    2026-01-14T02:27:23+02:00 INFO  [dap::transport] Debugger closed the connection
    2026-01-14T02:27:23+02:00 ERROR [crates/project/src/debugger/session.rs:2151] debugger shutdown unexpectedly
    
  8. vitallium commented on Jan 17, 2026

    @vitallium
    Collaborator

    Thanks for reporting all the use cases here. Unfortunately, I still can't reproduce this issue locally, so I have a theory that it could be an upstream issue. I'll continue trying to reproduce this issue locally, and I’ll also check the rdbg gem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions