{"id":8341,"date":"2019-12-14T10:20:47","date_gmt":"2019-12-14T01:20:47","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=8341"},"modified":"2023-05-27T22:51:42","modified_gmt":"2023-05-27T13:51:42","slug":"%e3%80%90vscode%e3%80%91rails%e3%81%ae%e3%83%87%e3%83%90%e3%83%83%e3%82%b0%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=8341","title":{"rendered":"\u3010VSCode\u3011Rails\u306e\u30c7\u30d0\u30c3\u30b0\u8a2d\u5b9a(Mac)"},"content":{"rendered":"<p>Rails\u304c\u7ba1\u7406\u3057\u3066\u3044\u308bGemfile\u306b\u4e0b\u8a18\u306e\u8a2d\u5b9a\u3092\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">group :development, :test do\r\n    gem 'ruby-debug-ide'\r\n    gem 'debase'\r\nend<\/pre>\n<p>bundle install\u3057\u307e\u3059\u3002(\u4e8b\u524d\u306bbundler\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5fc5\u8981\u3067\u3059\u3002\uff09<\/p>\n<pre class=\"lang:default decode:true \">bundle install<\/pre>\n<p>raunch.json\u306b\u4e0b\u8a18\u8a2d\u5b9a\u3092\u3057\u307e\u3059\u3002\uff08raunch.json\u81ea\u4f53\u306f\u8a2d\u5b9a\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u69cb\u6210\u306e\u8ffd\u52a0\u304b\u3089\u300cRuby\u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308c\u3070\u51fa\u3066\u304d\u307e\u3059\u3002\uff09<\/p>\n<pre class=\"lang:default decode:true\">\/\/Rails\u306e\u30c7\u30d0\u30c3\u30b0\u8a2d\u5b9a\r\n{\r\n    \"version\": \"0.2.0\",\r\n    \"configurations\": [\r\n      {\r\n        \"name\": \"Listen for rdebug-ide\",\r\n        \"type\": \"Ruby\",\r\n        \"request\": \"attach\",\r\n        \"cwd\": \"${workspaceRoot}\",\r\n        \"remoteHost\": \"127.0.0.1\",\r\n        \"remotePort\": \"1234\",\r\n        \"remoteWorkspaceRoot\": \"${workspaceRoot}\",\r\n        \"useBundler\": true\r\n      }\r\n    ]\r\n  }<\/pre>\n<p>VSCode\u306eDEBUG\u5b9f\u884c\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-8344\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2019\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2019-12-14-10.29.38.png\" alt=\"\" width=\"620\" height=\"396\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2019\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2019-12-14-10.29.38.png 620w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2019\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2019-12-14-10.29.38-300x192.png 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u4e0a\u3067\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002(Rails\u3082\u540c\u6642\u306b\u8d77\u52d5\u3057\u307e\u3059\u3002\uff09<\/p>\n<pre class=\"lang:default decode:true\">bundle exec rdebug-ide --host 127.0.0.1 --port 1234 --dispatcher-port 26162 -- bin\/rails s<\/pre>\n<p>\u3053\u308c\u3067\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3068\u304b\u306b\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3092\u8cbc\u3063\u3066\u30d6\u30e9\u30a6\u30b6\u4e0a\u3067\u52d5\u4f5c\u3055\u305b\u308c\u3070\u30c7\u30d0\u30c3\u30b0\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3069\u3093\u306a\u5024\u3092\u4fdd\u6301\u3057\u3066\u3044\u308b\u304b\u306a\u3069\u306f\u5de6\u30b5\u30a4\u30c9\u30d0\u30fc\u306b\u51fa\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u300c\u30c7\u30d0\u30c3\u30b0\u30b3\u30f3\u30bd\u30fc\u30eb\u300d\u304c\u4e0b\u306b\u51fa\u3066\u304f\u308b\u306e\u3067\u3001\u5909\u6570\u540d\u3092\u5165\u529b\u3057\u3066\u30a8\u30f3\u30bf\u30fc\u306a\u3069\u3092\u62bc\u3059\u3068\u666e\u901a\u306bRails\u30b3\u30f3\u30bd\u30fc\u30eb\u306e\u3088\u3046\u306b\u5909\u6570\u306e\u8a73\u7d30\u306a\u3069\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h2>\u30c7\u30d0\u30c3\u30b0\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8<\/h2>\n<table>\n<tbody>\n<tr>\n<th>\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30ad\u30fc<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>F5<\/td>\n<td>\u7d9a\u884c<\/td>\n<\/tr>\n<tr>\n<td>F10<\/td>\n<td>\u30b9\u30c6\u30c3\u30d7\u30aa\u30fc\u30d0\u30fc<\/td>\n<\/tr>\n<tr>\n<td>F11<\/td>\n<td>\u30b9\u30c6\u30c3\u30d7\u30a4\u30f3<\/td>\n<\/tr>\n<tr>\n<td>Shift + F11<\/td>\n<td>\u30b9\u30c6\u30c3\u30d7\u30a2\u30a6\u30c8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u975e\u5e38\u306b\u7c21\u5358\u306b\u4f7f\u3048\u308b\u306e\u306b\u4fbf\u5229\u6a5f\u80fd\u306a\u306e\u3067\u3069\u3093\u3069\u3093\u6d3b\u7528\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002\u3082\u3061\u308d\u3093\u3001byebug\u3068\u304b\u306e\u65b9\u304c\u3088\u308a\u624b\u8efd\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Rails\u304c\u7ba1\u7406\u3057\u3066\u3044\u308bGemfile\u306b\u4e0b\u8a18\u306e\u8a2d\u5b9a\u3092\u3057\u307e\u3059\u3002 group :development, :test do gem 'ruby-debug-ide' gem 'debase' end bundle insta [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[36,25],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/8341"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8341"}],"version-history":[{"count":7,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/8341\/revisions"}],"predecessor-version":[{"id":20521,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/8341\/revisions\/20521"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8341"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}