summaryrefslogtreecommitdiff
path: root/lib/irb/debug/ui.rb
AgeCommit message (Collapse)Author
2023-10-11[ruby/irb] Avoid locking the debug UI to a single threadStan Lo
(https://github.com/ruby/irb/pull/725) Since `debug` stores and updates the target thread via its Session's `@tc` variable, we don't need to and shouldn't lock the UI to the thread that activates the integration. https://github.com/ruby/irb/commit/202efdbf0c
2023-08-13[ruby/irb] Support seamless integration with ruby/debugStan Lo
(https://github.com/ruby/irb/pull/575) * Support native integration with ruby/debug * Prevent using multi-irb and activating debugger at the same time Multi-irb makes a few assumptions: - IRB will manage all threads that host sub-irb sessions - All IRB sessions will be run on the threads created by IRB itself However, when using the debugger these assumptions are broken: - `debug` will freeze ALL threads when it suspends the session (e.g. when hitting a breakpoint, or performing step-debugging). - Since the irb-debug integration runs IRB as the debugger's interface, it will be run on the debugger's thread, which is not managed by IRB. So we should prevent the 2 features from being used at the same time. To do that, we check if the other feature is already activated when executing the commands that would activate the other feature. https://github.com/ruby/irb/commit/d8fb3246be