Closed avucic closed 11 months ago
It looks like parsing paths isn't the issue. However, there are problems with following:
when I run this. command:
docker compose exec -i test rdbg --open --host 0.0.0.0 --port 12345 -c -- bundle exec rspec spec/models/my_spec.rb:207
and run attach cofiguration from vscode everything works as expected. Debugger will run single spec and execute breakpoint.
However I can't manage to work from Neovim. When I attach the editor to the debugger instead of running one test it will run all my tests until it stops at the desired location. Any idea what I'm missing here?
Also both editors stops at the first line. Why is that?
Thanks in advance
Your environment
ruby -v
: 3.2.2rdbg -v
: 1.9.1Describe the bug When I run my nvim ruby adapter and set breakpoint I'm receiving error:
Error setting breakpoints: /abs/path/to/spec/my_spec is not available
.Even with that error debugger will continue with first breakpoint at
require 'rubygems'
and if I press continue it will run the entire testing package until it comes to the desired breakpointTo Reproduce This is something that I tried outside my editor:
In docker terminal in existing container:
docker compose exec test rdbg --open --port 12345 --host 0.0.0.0 -c -- rspec spec/my_spec.rb:65
In second docker terminal
docker compose exec test rdbg -A
and then(rdbg:remote) b /abs/path/to/spec/my_spec:65 # No such file or directory @ rb_check_realpath_internal
With relative path it works.
Expected behavior Not to run whole suite and to stop immediately at my break point.
Additional context
Based on
RUBY_DEBUG_LOCAL_FS_MAP
my adapter should pass absoluthe path which will be transformed to remote local path.To be frank I'm not sure who is "responsible" for this transformation
rdbg
ornvim-dap
. There are similar issue with go/delve. However, it looks likedelve
have builtin path substationsubstitutePath
I tried with the option
RUBY_DEBUG_LOCAL_FS_MAP=/app:${workspaceFolder}
which doesn't help based on this localfsMapI was testing this with this adapter call running rdbg manually in my terminal:
(task debug will call docker exec)