

sudo apt install -y build-essential libssl-dev libreadline-dev zlib1g-dev We will first install some necessary bit using apt. Instead, we will use rbenv to download and install Ruby 2.5.1. We won’t install Ruby using apt (apt-get install ruby-full) since the default version using apt will be too low to run Rails. Here’s how to get a Rails environment set up using VS Online.įrom here we will install Ruby. This makes setting up something like a Ruby On Rails development environment in the cloud a pretty easy task. The launch.Visual Studio Online isn’t just VS in the cloud, it gives you a quick sharable Linux development environment in the cloud.

) is shared with the name /app in a container and VSCode on the host can connect to the debuggee process in a container by TCP/IP port 12345. And you will see the following default configurations. vscode/launch.json with default settings, you only need to click "create a launch.json file" on the "Run and Debug" pane. See also: Debugging in Visual Studio Codeįor developers: RUBY_DEBUG_DAP_SHOW_PROTOCOL=1 on rdbg terminal will show the all DAP protocol. On the debug console, you can input valid Ruby program and you will get an evaluation result on selected context ("Call stack"). When the program stops, you can see "Call stack", "Variables" and you can set "Watch" expressions.

You can see stdout/err outputs and you can input stdin on rdbg terminal.

When you select a command line, the specified command will run on rdbg debugger, and VSCode will connect to the rdbg debugger with UNIX domain socket.Īnd new terminal is created (named rdbg). bundle exec rspec (launch rspec command with bundle exec).ruby foo.rb 10 20 30 (launch foo.rb with options 10, 20 and 30).Please specify your favorite command line you want to debug. You will see the "Debug command line" input dialog. Without any configuration, you can use this debugger by "Start Debugging" (F5 key) if you activate. You need to install latest debug gem and rdbg command should be in $PATH. Ruby debugger to connect debug library which utilize recent Ruby's debug support features.
