Skip to content

Commit

Permalink
Remove fixed debugger socket path from the executable (#1405)
Browse files Browse the repository at this point in the history
After Shopify/vscode-ruby-lsp#876, we don't specify
the debugger socket path on the extension side anymore. So if we keep the
fixed path in the executable, it will cause the debugger to fail to connect.
  • Loading branch information
st0012 authored Feb 23, 2024
1 parent b01738f commit b1e1092
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions exe/ruby-lsp
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,6 @@ if options[:debug]
exit 1
end

sockets_dir = "/tmp/ruby-lsp-debug-sockets"
Dir.mkdir(sockets_dir) unless Dir.exist?(sockets_dir)
# ruby-debug-ENV["USER"] is an implicit naming pattern in ruby/debug
# if it's not present, rdbg will not find the socket
socket_identifier = "ruby-debug-#{ENV["USER"]}-#{File.basename(Dir.pwd)}.sock"
ENV["RUBY_DEBUG_SOCK_PATH"] = "#{sockets_dir}/#{socket_identifier}"

begin
require "debug/open_nonstop"
rescue LoadError
Expand Down

0 comments on commit b1e1092

Please sign in to comment.