3

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.

2 Answers 2

4

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.

Sign up to request clarification or add additional context in comments.

Comments

2

Currently VSCode cannot handle this.

For interactive console app debugging where input can be accepted, other IDEs such as Eclipse plus ruby plugin, or Netbeans plus ruby plugin, or an IntelliJ family IDE with ruby plugin (or rubymine itself) is a better choice for teaching ruby with interactive visible execution (single step through code, stop, and accept user input then continue code).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.