binding.pry debugger not working on Windows 11

1 month ago 12
ARTICLE AD BOX

I'm running into issues with binding.pry on Windows 11. When I insert it into my Ruby script, the program reaches that line but either skips over it or pauses without accepting any input.

🧪 Problem:

binding.pry is hit, but the terminal becomes unresponsive.

No input is accepted, and I can't interact with the Pry session.

🖥️ Environment:

OS: Windows 11

Ruby: 3.x (via RubyInstaller with MSYS2)

Pry: Installed via gem install pry

Terminal: Tried Command Prompt, PowerShell, Windows Terminal, ConEmu

✅ What I've Tried:

Verified require 'pry' is present

binding.irb

Ran script directly from terminal (ruby script.rb)

Tried adding --tty to RSpec

Confirmed Pry is installed and loaded

Tried switching terminal setting to ensure it works as previous versions

Start > Setting > Search 'for developers > terminal > set to 'Windows console host'

after that restart system.

❌ Constraints:

I need a solution that works in native Windows terminals

❓ Question:

Is there a known workaround or configuration that enables binding.pry to work interactively in native Windows 11 terminals? Any help would be appreciated!

Read Entire Article