Comments (11)
This seems to be caused by introduction of 60s @open_timeout
in http.rb. It used to be nil, so no additional threads were spawned. Now, with 60s it spawns a new thread, which cannot run as the process is stopped on the breakpoint, so it timeouts there.
Minimal case would look like this:
require 'timeout'
def compute_with_timeout
Timeout.timeout(10) { Thread.list }
end
with = compute_with_timeout #breakpoint here
puts with
from ruby-debug-ide.
Per this stackoverflow question, this is also happening with Watir-webdriver.
from ruby-debug-ide.
Sorry to bump a really old thread. Did this get anywhere?
from ruby-debug-ide.
class OverrideDriver < Selenium::WebDriver::Remote::Http::Default
def http
client = super
client.open_timeout = 0
client
end
end
# when creating driver instance
Watir.new(:chrome, http_client: OverrideDriver.new)
that solves the issue for me
from ruby-debug-ide.
@xenjke Are you using Se3+?
from ruby-debug-ide.
@luke-hill 3.4.0 it is
from ruby-debug-ide.
@luke-hill another workaround mentioned in https://youtrack.jetbrains.com/issue/RUBY-17930#comment=27-1794364 is to monkeypatch the Timeout module for debugging purposes only.
Do not use that on production.
module Timeout
def timeout(sec, klass=nil)
yield(sec)
end
module_function :timeout
end
from ruby-debug-ide.
came up with
if $LOADED_FEATURES.any? { |f| f.include? 'debase' }
module Timeout
def timeout(sec, klass=nil)
yield(sec)
end
module_function :timeout
end
end
from ruby-debug-ide.
@xenjke The original one works when I implement it as written (I tried a slightly shorter version).
I'd rather know why this has happened. I had a look at the docs and I have traced the file in RubyMine, but as I'm using Se2.53 I'm not sure why this is happening.
Either way your fix works, I just hope RubyMine fix it up their end if possible
from ruby-debug-ide.
This issue can be closed as fixed.
For readers: Use at least RubyMine 2017.2.x
+ and either
Ruby 2.2
or
Ruby 2.3
+ and Selenium 3.0.7
+
from ruby-debug-ide.
@luke-hill There is still an issue with incorrect thread usage for timeout, #128 should make ruby use another thread for evaluation. It's targeted to 2018.1
from ruby-debug-ide.
Related Issues (20)
- Debugger fails on apple m1 HOT 2
- Ruby Remote Debug Can Cause Arbitrary Remote Code Execution
- "daemon not healthy" on fresh install
- Undefined method 'index' for nil:NilClass @ /usr/local/bundle/ruby/2.6.0/gems/debase-0.2.4.1/lib/debase/context.rb:35:in `at_line' HOT 2
- Segmentation fault in Ruby 3.1.0 / RubyMine debugger HOT 6
- Nix incompatibility
- Can't debug Rails server old version 3.2.22.5, VSCode 1.64.2
- Uncaught exception - rdebug-ide fails to initialize superclass
- ruby 3,symbol not found in flat namespace '_RHASH_EMPTY_P'
- Support the "logpoint" breakpoint variant
- Question: How to use ruby-debug-ide with unicorn? How to use --attach-mode?
- --skip-wait-for-start makes certain files not to stop more than once HOT 1
- When started without breakpoints, only pauses code execution once
- How to start the debugger from Ruby? (Also: How to set a breakpoint in HAML?) HOT 2
- rdebug-ide is getting stuck when executing `notify_dispatcher_if_needed`
- Migrate tests to GHA
- irb 1.6.4
- Issue with bundle install with Rails 7.0 & Ruby 3.2 on Docker MacOS M1 HOT 2
- Debugger hits all breakpoints once then stops HOT 1
- Incompatibility with ruby 3.3.0 on Sonoma? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-debug-ide.