Ruby Debugging Error "wrong number of arguments (given 2, expected 1)"

Debugging fails with message “wrong number of arguments (given 2, expected 1)”.
Komodo IDE 12.0.1, build 91869, platform linux-x86_64. Built on Mon Feb 10 19:37:24 2020.
Ruby RVM versions 2.4.1 through 2.7.2 with byebug 10.x - 11.1.3
os = Linux Mint 20.0
Ruby script “puts ‘hello’”
Selecting F7, no debug, produces the expected output.
various online searches have turned up nothing useful.

Morning @brindamo,

It’s likely that you’re using too new a version of ByeBug. You’ll need to rollback to 9.1.0 according to the last time I looked at this issue:

Thanks for the help. Rolling back to 9.1.0 cleared up the “wrong number of arguments…” issue but I now get
/home/rodb/Programs/Komodo-IDE-12/lib/support/dbgp/rubylib/rdbgp2.rb:369: warning: URI.escape is obsolete
and
#<Byebug::DebugThread:0x00005572ffc882d8 /home/rodb/Programs/Komodo-IDE-12/lib/support/dbgp/rubylib/rdbgp2.rb:472 run> terminated with exception (report_on_exception is true):

Dear Brindamo,

I have found a “solution” that worked for me! hopefully it will work for you too. I had the exact same two problems that you had.

You’re going to have to “hack” Komodo itself to solve the problem. Because URI.escape has been deprecated (for more than a decade!) it shouldn’t be in the Komodo IDO code at all. Because (and ONLY because) this is a fairly simple case - i.e. they are simply escaping and unescaping a filename) you can drop-in Addressable::URI as an alternative.

TESTED ON Linux Mint 19 with Ruby 2.7.2. I make no promises about any other environment!

So, the solution for me was:

Edit ./Komodo-IDE-12/lib/support/dbgp/rubylib/rdbgp2.rb

line 45: require ‘addressable’

line 360:

URI.unescape(URI.parse(uri).path)

  Addressable::URI.unencode(URI.parse(uri).path)

line 369:

“file://#{URI.escape(filename)}”

  "file://#{Addressable::URI.encode(filename)}"

I hope that helps! Is there a way we can bump this message up to the Devs? (or is Komodo an open source project somewhere that we can submit a pull request?)

Cheers!

Mark,
Beauty! Works like a charm. I’ve confirmed it on Ruby 2.7.2 on Linux Mint 20.1. I really appreciate your help with this. I’ll see if I can get it to work on Ruby 3.0.0. which is almost twice as fast as 2.7.2
Cheers,
Rod