Under the hood, it invokes inspect, which may trigger Active Record queries, which could be gated by a timeout thread - ultimately causing the debugger to hang forever.
This PR just ensures that threads are restarted for the backtrace command, so that we never get into a situation where the debugger is stuck.
Description
In https://github.com/ruby/debug/commit/3255b7124a0abe20c780f5ae7fba11c3ff690de3, many commands were changed to unfreeze threads to prevent the debugger from hanging. However, the same can occur when running
backtrace
.Under the hood, it invokes
inspect
, which may trigger Active Record queries, which could be gated by a timeout thread - ultimately causing the debugger to hang forever.This PR just ensures that threads are restarted for the backtrace command, so that we never get into a situation where the debugger is stuck.