Setting that converts to binding.pry when you type pry in VScode

Introduction

I will show you how to easily output debug (binding.pry) that you will definitely use when developing with Rails with VScode.

Setting

1 Select command + shift + P → Configure User Snippets on VScode

スクリーンショット 2020-06-06 20.37.56.png

2 Select ruby.json

スクリーンショット 2020-06-06 20.38.56.png

3 Add the code below

By changing the value of "prefix", you can convert any character to binding.pry instead of pry.

ruby.json


"Debug Console": {
  "prefix": "pry",
  "body": "binding.pry\n",
  "description": "A runtime developer console"
}

4 Convert to binding.pry with pry + Enter

ezgif.com-video-to-gif.gif

Recommended Posts

Setting that converts to binding.pry when you type pry in VScode
When you want to bind InputStream in JDBI3
When you want to dynamically replace Annotation in Java8
Object-oriented design that can be used when you want to return a response in form format
What to do when you want to know the source position where the method is defined in binding.pry
ProxyFactory is convenient when you want to test AOP in Spring!
When you receive a call, send an SMS to that number