ruby-debug / debase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Debugger occasionally stops when debugging rails app

denofevil opened this issue · comments

Possible STR:
What steps will reproduce the problem?

  1. Run a Rails server in debug mode
  2. Visit http://localhost:3000
  3. Visit http://localhost:3000 again

What is the expected result?
The page should load.

What happens instead?
The IDE is at a breakpoint within Rails, though I did not set the breakpoint.

Log

"C:\Program Files (x86)\JetBrains\IntelliJ IDEA 142.5239.7\bin\runnerw.exe" C:\Ruby220\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Ruby220/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide --debug --disable-int-handler --evaluation-timeout 10 --rubymine-protocol-extensions --port 35879 --dispatcher-port 35880 -- D:/Development/Projects/Coursemology/bin/rails server -b 127.0.0.1 -p 3000 -e development
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.2.beta5, file filtering is supported) listens on 127.0.0.1:35879
Connected from 127.0.0.1
6332: Starting control thread
6332: Processing in control: b C:/Program Files/Ruby 2.2/lib/ruby/site_ruby/2.2.0/rubygems/remote_fetcher.rb:174
6332: <breakpointAdded no="1" location="C:/Program Files/Ruby 2.2/lib/ruby/site_ruby/2.2.0/rubygems/remote_fetcher.rb:174"/>
6332: Processing in control: include D:/Development/Projects/Coursemology\
6332: <fileIncluded file="D:/Development/Projects/Coursemology"/>
6332: Processing in control: include D:/Development/Projects/activerecord-userstamp\
6332: <fileIncluded file="D:/Development/Projects/activerecord-userstamp"/>
6332: Processing in control: include D:/Development/Projects/schema_plus_association_inverses\
6332: <fileIncluded file="D:/Development/Projects/schema_plus_association_inverses"/>
6332: Processing in control: include D:/Development/Projects/simple_form-bootstrap\
6332: <fileIncluded file="D:/Development/Projects/simple_form-bootstrap"/>
6332: Processing in control: exclude D:/Development/Projects/Coursemology/.bundle\
6332: <fileExcluded file="D:/Development/Projects/Coursemology/.bundle"/>
6332: Processing in control: exclude D:/Development/Projects/Coursemology/.yardoc\
6332: <fileExcluded file="D:/Development/Projects/Coursemology/.yardoc"/>
6332: Processing in control: exclude D:/Development/Projects/Coursemology/coverage\
6332: <fileExcluded file="D:/Development/Projects/Coursemology/coverage"/>
6332: Processing in control: exclude D:/Development/Projects/Coursemology/log\
6332: <fileExcluded file="D:/Development/Projects/Coursemology/log"/>
6332: Processing in control: exclude D:/Development/Projects/Coursemology/tmp\
6332: <fileExcluded file="D:/Development/Projects/Coursemology/tmp"/>
6332: Processing in control: exclude D:/Development/Projects/Coursemology/vendor/bundle\
6332: <fileExcluded file="D:/Development/Projects/Coursemology/vendor/bundle"/>
6332: Processing in control: exclude D:/Development/Projects/activerecord-userstamp/.bundle/ruby\
6332: <fileExcluded file="D:/Development/Projects/activerecord-userstamp/.bundle/ruby"/>
6332: Processing in control: exclude D:/Development/Projects/schema_plus_association_inverses/.bundle/ruby\
6332: <fileExcluded file="D:/Development/Projects/schema_plus_association_inverses/.bundle/ruby"/>
6332: Processing in control: exclude D:/Development/Projects/schema_plus_association_inverses/.bundle/ruby\
6332: <fileExcluded file="D:/Development/Projects/schema_plus_association_inverses/.bundle/ruby"/>
6332: Processing in control: exclude D:/Development/Projects/simple_form-bootstrap/.bundle/ruby\
6332: <fileExcluded file="D:/Development/Projects/simple_form-bootstrap/.bundle/ruby"/>
6332: Processing in control: start
6332: Starting: running program script
=> Booting WEBrick
=> Rails 4.2.3 application starting in development on http://127.0.0.1:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2015-10-09 22:37:30] INFO  WEBrick 1.3.1
[2015-10-09 22:37:30] INFO  ruby 2.2.4 (2015-10-06) [x64-mswin64_120]
[2015-10-09 22:37:30] INFO  WEBrick::HTTPServer#start: pid=6332 port=3000

//=======================
// snip normal Rails log
//=======================

Completed 500 Internal Server Error in 4193ms (ActiveRecord: 238.4ms)
6332: <suspended file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/flash.rb" line="262" threadId="4" frames="38"/>
6332: Stopping Thread #<Thread:0x0000c48c7b5a10> (6332)
6332: Threads equal: true
6332: Processing in control: th l
6332: <threads>
6332: <thread id="2" status="sleep" pid="6332" />
6332: <thread id="3" status="sleep" pid="6332" />
6332: <thread id="4" status="sleep" pid="6332" />
6332: <thread id="5" status="sleep" pid="6332" />
6332: <thread id="6" status="sleep" pid="6332" />
6332: </threads>
6332: Processing in control: th l
6332: <threads>
6332: <thread id="2" status="sleep" pid="6332" />
6332: <thread id="3" status="sleep" pid="6332" />
6332: <thread id="4" status="sleep" pid="6332" />
6332: <thread id="5" status="sleep" pid="6332" />
6332: <thread id="6" status="sleep" pid="6332" />
6332: </threads>
6332: Processing in control: th l
6332: <threads>
6332: <thread id="2" status="sleep" pid="6332" />
6332: <thread id="3" status="sleep" pid="6332" />
6332: <thread id="4" status="sleep" pid="6332" />
6332: <thread id="5" status="sleep" pid="6332" />
6332: <thread id="6" status="sleep" pid="6332" />
6332: </threads>
6332: Processing in context: w
6332: <frames>
6332: <frame no="1" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/flash.rb" line="262" current='true' />
6332: <frame no="2" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/flash.rb" line="272" />
6332: <frame no="3" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb" line="225" />
6332: <frame no="4" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb" line="220" />
6332: <frame no="5" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/cookies.rb" line="560" />
6332: <frame no="6" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/query_cache.rb" line="36" />
6332: <frame no="7" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb" line="653" />
6332: <frame no="8" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb" line="377" />
6332: <frame no="9" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/callbacks.rb" line="29" />
6332: <frame no="10" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb" line="84" />
6332: <frame no="11" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/callbacks.rb" line="27" />
6332: <frame no="12" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/reloader.rb" line="73" />
6332: <frame no="13" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/remote_ip.rb" line="78" />
6332: <frame no="14" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/debug_exceptions.rb" line="17" />
6332: <frame no="15" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/show_exceptions.rb" line="30" />
6332: <frame no="16" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/rack/logger.rb" line="38" />
6332: <frame no="17" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/rack/logger.rb" line="20" />
6332: <frame no="18" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb" line="68" />
6332: <frame no="19" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb" line="26" />
6332: <frame no="20" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb" line="68" />
6332: <frame no="21" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/rack/logger.rb" line="20" />
6332: <frame no="22" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/request_store-1.2.0/lib/request_store/middleware.rb" line="8" />
6332: <frame no="23" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/request_id.rb" line="21" />
6332: <frame no="24" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/methodoverride.rb" line="22" />
6332: <frame no="25" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/runtime.rb" line="18" />
6332: <frame no="26" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/cache/strategy/local_cache_middleware.rb" line="28" />
6332: <frame no="27" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/lock.rb" line="17" />
6332: <frame no="28" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/static.rb" line="116" />
6332: <frame no="29" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/sendfile.rb" line="113" />
6332: <frame no="30" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/rack-mini-profiler-0.9.6/lib/mini_profiler/profiler.rb" line="279" />
6332: <frame no="31" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/engine.rb" line="518" />
6332: <frame no="32" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/application.rb" line="165" />
6332: <frame no="33" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/lock.rb" line="17" />
6332: <frame no="34" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/content_length.rb" line="15" />
6332: <frame no="35" file="D:/Development/Projects/Coursemology/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb" line="88" />
6332: <frame no="36" file="C:/Ruby220/lib/ruby/2.2.0/webrick/httpserver.rb" line="138" />
6332: <frame no="37" file="C:/Ruby220/lib/ruby/2.2.0/webrick/httpserver.rb" line="94" />
6332: <frame no="38" file="C:/Ruby220/lib/ruby/2.2.0/webrick/server.rb" line="294" />
6332: </frames>
6332: Processing in context: frame 1
6332: Selected frame no 0
6332: Processing in context:  v l
6332: <variables>
6332: <variable name="self"  kind="local"  type="ActionDispatch::Flash" hasChildren="true" objectId="+0x62466b1568">
6332: <value><![CDATA[#&lt;ActionDispatch::Flash:0x0000c48cd62ad0&gt;]]></value>
6332: </variable>
6332: <variable name="#$!" kind="local"/>
6332: <variable name="env" compactValue="{CONTENT_LENGTH: 372, CONTENT_TYPE: application/x-www-form-urlencoded, GATEWAY_INTERFACE: CGI/1.1, HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8, HTTP_ACCEPT_ENCODING: gzip, deflate, HTTP_ACCEPT_LANGUAGE: en-US,en-GB;q=0.8,en;q=0.7,ja;q=0.5,zh-SG;q=0.3,zh;q=0.2, ...}" kind="local"  type="Hash" hasChildren="true" objectId="+0x6246367470">
6332: <value><![CDATA[Hash (81 elements)]]></value>
6332: </variable>
6332: <variable name="flash_hash" kind="local"/>
6332: <variable name="session" kind="local"/>
6332: </variables>
6332: Processing in context: frame 1
6332: Selected frame no 0
6332: Processing in context:  v inspect @app
6332: Evaluating @app with timeout after 10 sec
6332: <variables>
6332: <variable name="eval_result"  kind="local"  type="ActionDispatch::ParamsParser" hasChildren="true" objectId="+0x62466b1be4">
6332: <value><![CDATA[#&lt;ActionDispatch::ParamsParser:0x0000c48cd637c8&gt;]]></value>
6332: </variable>
6332: </variables>
6332: Processing in context: frame 1
6332: Selected frame no 0
6332: Processing in context:  v inspect Request::Session
6332: Evaluating Request::Session with timeout after 10 sec
6332: <variables>
6332: <variable name="eval_result"  kind="local"  type="Class" hasChildren="false" objectId="+0x624676cf20">
6332: <value><![CDATA[ActionDispatch::Request::Session]]></value>
6332: </variable>
6332: </variables>
6332: Processing in context: frame 1
6332: Selected frame no 0
6332: Processing in context:  v inspect KEY
6332: Evaluating KEY with timeout after 10 sec
6332: <variables>
6332: <variable name="eval_result"  kind="local"  type="String" hasChildren="true" objectId="+0x624369b824">
6332: <value><![CDATA[action_dispatch.request.flash_hash]]></value>
6332: </variable>
6332: </variables>

the problem might be caused by https://bugs.ruby-lang.org/issues/11492 (in this case everything should work with ruby-head) If it doesn't work please add Debase.verbose to true (somewhere at the beginning of rails loading) and it will provide huge output with all events. Please send the output and I will try to understand what goes wrong.

@denofevil it looks like the fix for 11492 has been backported to 2.1.x too (should be available in 2.1.8)
Perhaps we can close the ticket or do you wont to invent the way to workaround possible bugs in trace API? ;)

@os97673, thanks for letting know :)