ruby / debug

Debugging functionality for Ruby
BSD 2-Clause "Simplified" License
1.14k stars 127 forks source link

Do not use HEAD request if 1 port #1035

Closed ko1 closed 1 year ago

ko1 commented 1 year ago

If there is only one opening debug port with UNIX domain socket, no need to use HEAD request.

Before:

$ exe/rdbg -O target.rb
DEBUGGER: Debugger can attach via UNIX domain socket (/run/user/1000/ruby-debug-ko1-223816)
DEBUGGER: wait for debugger connection...
DEBUGGER: Connected.
DEBUGGER: GreetingError: HEAD request
DEBUGGER: Disconnected.
DEBUGGER: Connected.

After:

$ exe/rdbg -O target.rb
DEBUGGER: Debugger can attach via UNIX domain socket (/run/user/1000/ruby-debug-ko1-223984)
DEBUGGER: wait for debugger connection...
DEBUGGER: Connected.