ruby-debug / ruby-debug-ide

An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and RubyMine.
https://www.jetbrains.com/ruby/features/ruby_debugger.html
Other
370 stars 83 forks source link

Debugger fails on apple m1 #219

Closed AnshumanTripathi closed 2 years ago

AnshumanTripathi commented 3 years ago

Debugger fails to run on apple m1.

Traceback (most recent call last):
    7: from /Users/anshumantripathi/.rvm/gems/ruby-2.7.3/gems/ruby-debug-ide-2.3.1/bin/rdebug-ide:8:in `<main>'
    6: from /Users/anshumantripathi/.rvm/gems/ruby-2.7.3/gems/ruby-debug-ide-2.3.1/bin/rdebug-ide:8:in `require_relative'
    5: from /Users/anshumantripathi/.rvm/gems/ruby-2.7.3/gems/ruby-debug-ide-2.3.1/lib/ruby-debug-ide.rb:9:in `<top (required)>'
    4: from /Users/anshumantripathi/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
    3: from /Users/anshumantripathi/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
    2: from /Users/anshumantripathi/.rvm/gems/ruby-2.7.3/gems/debase-2.3.2/lib/debase.rb:7:in `<top (required)>'
    1: from /Users/anshumantripathi/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
/Users/anshumantripathi/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require': dlopen(/Users/anshumantripathi/.rvm/gems/ruby-2.7.3/gems/debase-2.3.2/lib/debase_internals.bundle, 9): no suitable image found.  Did find: (LoadError)
    /Users/anshumantripathi/.rvm/gems/ruby-2.7.3/gems/debase-2.3.2/lib/debase_internals.bundle: mach-o, but wrong architecture
    /Users/anshumantripathi/.rvm/gems/ruby-2.7.3/gems/debase-2.3.2/lib/debase_internals.bundle: mach-o, but wrong architecture - /Users/anshumantripathi/.rvm/gems/ruby-2.7.3/gems/debase-2.3.2/lib/debase_internals.bundle

Process finished with exit code 1

Environment

AnshumanTripathi commented 2 years ago

This solution helped https://github.com/oneclick/rubyinstaller2/issues/96#issuecomment-434619796. If debase and ruby-debug-ide are installed using IntelliJ, it fails.

Installing debase and ruby-debug-ide manually using --platform ruby and then I can debug in VSCode.

AnshumanTripathi commented 2 years ago

Updating IntelliJ to the new apple silicon compatible version fixed the problem.