Load history when starting a direct debug session#1046
Merged
Conversation
When starting a debug session directly with RUBY_DEBUG_IRB_CONSOLE=1 and `require 'debug'; debugger`, IRB's history wasn't loaded. This commit ensures history is loaded in this case by calling `load_history` when configuring IRB for the debugger. Fixes ruby#975
st0012
approved these changes
Dec 12, 2024
st0012
left a comment
Member
There was a problem hiding this comment.
Can confirm the patch fixes the issue, thank you!
st0012
reviewed
Dec 12, 2024
matzbot
pushed a commit
to ruby/ruby
that referenced
this pull request
Dec 12, 2024
(ruby/irb#1046) * Load history when starting a direct debug session When starting a debug session directly with RUBY_DEBUG_IRB_CONSOLE=1 and `require 'debug'; debugger`, IRB's history wasn't loaded. This commit ensures history is loaded in this case by calling `load_history` when configuring IRB for the debugger. Fixes ruby/irb#975 * Update test/irb/test_history.rb * Update lib/irb/debug.rb --------- ruby/irb@7f851b5353 Co-authored-by: Stan Lo <stan001212@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When starting a debug session directly with RUBY_DEBUG_IRB_CONSOLE=1 and
require 'debug'; debugger, IRB's history wasn't loaded. This commit ensures history is loaded in this case by callingload_historywhen configuring IRB for the debugger.Fixes #975