使用RubyMine调试Rails 5:断点不起作用

时间:2018-05-03 01:23:21

标签: ruby-on-rails debugging rubymine

我刚刚安装了最新的RubyMine(2018.1.1),并使用RubyMine中的向导创建了一个Rails 5.2应用程序。然后我生成了一个脚手架,以便我可以测试一些东西。

如果我在单元测试中设置断点,则断点有效。但是,如果我运行Web服务器(我尝试了两者 - 默认的Puma和WEBrick),没有断点工作。我可以从控制器中看到打印语句,但断点永远不会被触发。

我做错了什么?

以下是我的宝石列表:

>>> N, Wn = signal.buttord([20, 50], [14, 60], 3, 40, True)
>>> b, a = signal.butter(N, Wn, 'band', True)

我正在使用actioncable (5.2.0) actionmailer (5.2.0) actionpack (5.2.0) actionview (5.2.0) activejob (5.2.0) activemodel (5.2.0) activerecord (5.2.0) activestorage (5.2.0) activesupport (5.2.0) addressable (2.5.2) archive-zip (0.11.0) arel (9.0.0) bigdecimal (default: 1.3.4) bindex (0.5.0) bootsnap (1.3.0) builder (3.2.3) bundler (1.16.1) byebug (10.0.2) capybara (3.0.3) childprocess (0.9.0) chromedriver-helper (1.2.0) cmath (default: 1.0.0) coffee-rails (4.2.2) coffee-script (2.4.1) coffee-script-source (1.12.2) concurrent-ruby (1.0.5) crass (1.0.4) csv (default: 1.0.0) date (default: 1.0.0) debase (0.2.2) debase-ruby_core_source (0.10.3) erubi (1.7.1) etc (default: 1.0.0) execjs (2.7.0) fcntl (default: 1.0.0) ffi (1.9.23) fiddle (default: 1.0.0) fileutils (default: 1.0.2) globalid (0.4.1) i18n (1.0.1) io-console (default: 0.4.6) io-like (0.3.0) ipaddr (default: 1.2.0) jbuilder (2.7.0) json (default: 2.1.0) listen (3.1.5) loofah (2.2.2) mail (2.7.0) marcel (0.3.2) method_source (0.9.0) mimemagic (0.3.2) mini_mime (1.0.0) mini_portile2 (2.3.0) minitest (5.11.3) msgpack (1.2.4) multi_json (1.13.1) nio4r (2.3.0) nokogiri (1.8.2) openssl (default: 2.1.0) psych (default: 3.0.2) public_suffix (3.0.2) puma (3.11.4) rack (2.0.5) rack-test (1.0.0) rails (5.2.0) rails-dom-testing (2.0.3) rails-html-sanitizer (1.0.4) railties (5.2.0) rake (12.3.1) rb-fsevent (0.10.3) rb-inotify (0.9.10) rdoc (default: 6.0.1) ruby-debug-ide (0.7.0.beta4) ruby_dep (1.5.0) rubyzip (1.2.1) sass (3.5.6) sass-listen (4.0.0) sass-rails (5.0.7) scanf (default: 1.0.0) sdbm (default: 1.0.0) selenium-webdriver (3.11.0) spring (2.0.2) spring-watcher-listen (2.0.1) sprockets (3.7.1) sprockets-rails (3.2.1) sqlite3 (1.3.13) stringio (default: 0.0.1) strscan (default: 1.0.0) thor (0.20.0) thread_safe (0.3.6) tilt (2.0.8) turbolinks (5.1.1) turbolinks-source (5.1.0) tzinfo (1.2.5) uglifier (4.1.10) web-console (3.6.2) webrick (default: 1.4.2) websocket-driver (0.7.0) websocket-extensions (0.1.3) xpath (3.0.0) zlib (default: 1.0.0)

1 个答案:

答案 0 :(得分:1)

此问题记录在此处:https://youtrack.jetbrains.com/issue/RUBY-20684

还指定了一种解决方法: comment bootsnap requiring in the Gemfile and in the boot.rb

评论bootsnap对我有用 - 断点现在有效。