Comments (2)
I also couldn't reproduce the issue.
[master]$ ruby target.rb
Run options: --seed 18748
# Running:
[1, 10] in target.rb
1| require 'minitest/autorun'
2| require 'debug'
3|
4| class FooTest < Minitest::Test
5| def test_foo
=> 6| debugger
7| assert_equal 'foo', 'foo'
8| end
9| end
10|
=>#0 FooTest#test_foo at target.rb:6
#1 block in run (3 levels) at ~/ruby/install/master/lib/ruby/gems/3.3.0+0/gems/minitest-5.20.0/lib/minitest/test.rb:94
# and 20 frames (use `bt' command for all frames)
(rdbg) p x # command
eval error: undefined local variable or method `x' for #<FooTest:0x00007fdea5f42cf8>
(rdbg)/target.rb:1:in `test_foo'
=> nil
(rdbg) x
eval error: undefined local variable or method `x' for #<FooTest:0x00007fdea5f42cf8>
(rdbg)/target.rb:1:in `test_foo'
nil
> GEMS/timeout-0.3.2/lib/timeout.rb:113:in `sleep'
... timeout ...
> GEMS/timeout-0.3.2/lib/timeout.rb:111:in `block in create_timeout_thread'
["DEBUGGER Exception: GEMS/debug-1.8.0/lib/debug/thread_client.rb:1251", #<LocalJumpError: break from proc-closure>, ["GEMS/debug-1.8.0/lib/debug/thread_client.rb:458:in `block in frame_eval'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:457:in `each'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:457:in `rescue in frame_eval'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:436:in `frame_eval'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:1043:in `wait_next_action_'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:866:in `wait_next_action'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:321:in `suspend'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:252:in `on_breakpoint'", "GEMS/debug-1.8.0/lib/debug/breakpoint.rb:69:in `suspend'", "GEMS/debug-1.8.0/lib/debug/breakpoint.rb:170:in `block in setup'", "GEMS/debug-1.8.0/lib/debug/session.rb:2616:in `debugger'", "test/my_test.rb:34:in `block (2 levels) in <main>'", "PROJ/test/minitest_should.rb:30:in `instance_exec'", ... minitest stack ...]]
Does it multi-threaded program with timeout?
If you can make smaller repro-code, it will help a lot.
from debug.
OK, I was able to reproduce this (in the same codebase as @zenspider) and I think this is a manifestation of https://bugs.ruby-lang.org/issues/18991. If code coverage collection (simplecov) is disabled, then the issue does not occur.
It also is fixed with Ruby 3.2.2, and with the tip of the ruby_3_1 branch (3.1.4-0a70dde90ab2b52191f4782d0ec7d0a99ab1e845), because the fix was backported. However, this isn't fixed in a released version of Ruby 3.1, because there hasn't been a release since the backport was done.
from debug.
Related Issues (20)
- `rdbg` without no arguments HOT 3
- Setting breaking points with absolute path fails from nvim-dap and rdbg on Docker container HOT 1
- binding.b doesn't stop code on second controller request and above
- History not available
- Setting the irb_console configuration true has no effect HOT 1
- <enter> does not repeat last command in irb_console mode.
- Proposal: reverse continue
- Feat/Bug: Set the value of `_` (underscore) to the value of the last ruby expression HOT 3
- Slow print (STDOUT) of large objects
- Question: Could not load source 'Fastfile': not found, while debugging a Fastlane lane from VSCODE
- Remove usage of deprecated constant IRB::InputCompletor
- `!!!` to fast forward breakpoints like in pry HOT 5
- Large data output HOT 1
- Add a shorter alias for the whereami command HOT 1
- Could not find valid gem HOT 1
- Cut a new release for the Rails stdin bug HOT 2
- Keystrokes between `debugger` sessions seem to persist HOT 4
- after_fork_parent method waits for all child processes to stop HOT 2
- Having to specify bundle exec twice HOT 2
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 debug.