Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code - Can ruby debugger in vscode handle input from gets?

I am trying to debug a simple "tutorial" ruby program that uses gets to fetch input. It seems the debugger freezes and there is no way to input a line of text into the program when it runs in the debugger. Is this expected? Is it possible to debug interactive ruby console text input?

This seems useful to me when teaching some basic "enter your name and age" type programs to young developers.

like image 776
Warren P Avatar asked Dec 22 '25 16:12

Warren P


1 Answers

By using the code runner extension and going to : settings => code runner : run in terminal => check , it will work and ask for the input. 03/01/2022 ; in case someone new is looking for the answer.

like image 150
Rei Avatar answered Dec 24 '25 08:12

Rei