{"id":1181,"date":"2017-04-14T13:47:58","date_gmt":"2017-04-14T04:47:58","guid":{"rendered":"http:\/\/blog.box.kr\/?p=1181"},"modified":"2017-04-14T13:47:58","modified_gmt":"2017-04-14T04:47:58","slug":"c-development-using-visual-studio-code-cmake-and-lldb","status":"publish","type":"post","link":"https:\/\/blog.box.kr\/?p=1181","title":{"rendered":"C++ Development using Visual Studio Code, CMake and LLDB"},"content":{"rendered":"<p class=\"graf graf--p graf-after--h3\">this article are captured as &#8220;<a href=\"https:\/\/medium.com\/audelabs\/c-development-using-visual-studio-code-cmake-and-lldb-d0f13d38c563\">https:\/\/medium.com\/audelabs\/c-development-using-visual-studio-code-cmake-and-lldb-d0f13d38c563<\/a>&#8220;<\/p>\n<p class=\"graf graf--p graf-after--h3\">&nbsp;<\/p>\n<p id=\"82b2\" class=\"graf graf--p graf-after--h3\">I\u2019ve been working for almost a year implementing micro-services on C++11 running as Docker containers. Through my journey I\u2019ve seen to emerge quite a bunch of interesting tools to work with C++ on this field (micro-services and Docker).<\/p>\n<p id=\"a7cf\" class=\"graf graf--p graf-after--p\">I started using Xcode on Mac OS X (now macOS). Even when Xcode is a fine tool to work on a C++ project, with a very appealing UI and an not a super good debugging experience but useful IMHO, it has a really annoying feature: it is constantly indexing the code while I\u2019m typing it and, in consequence, spinning my MacBook Pro\u2019s fans up to 5000 rpm and making it really hot. I tried disabling all code completion options in <strong class=\"markup--strong markup--p-strong\">preferences<\/strong> without any success. This made me think about returning to Emacs which, even when I used it in the past, I would say I\u2019m not an expert and re-loading it in my brain will take me some time to interiorize the shortcut keys and so on, so I thought about looking for something similar but modern, for that I passed through TextMate, Atom, Sublime and <a class=\"markup--anchor markup--p-anchor\" href=\"https:\/\/code.visualstudio.com\/?utm_expid=101350005-35.Eg8306GUR6SersZwpBjURQ.0&amp;utm_referrer=https%3A%2F%2Fwww.google.com.mx%2F\" target=\"_blank\" rel=\"nofollow noopener\" data-href=\"https:\/\/code.visualstudio.com\/?utm_expid=101350005-35.Eg8306GUR6SersZwpBjURQ.0&amp;utm_referrer=https%3A%2F%2Fwww.google.com.mx%2F\">Visual Studio Code<\/a>.<\/p>\n<p id=\"3b91\" class=\"graf graf--p graf-after--p\">Visual Studio Code (VSC from now on) has a similar idea as Emacs has, to provide a very simple editing tool but powerful at the same time providing the full development cycle (editing, building and debugging all inside the tool). It runs with native performance on Windows, OS X and Linux and with a very adaptive UI that looks and feels native to the OS where it runs, which is a plus.<\/p>\n<p id=\"66f9\" class=\"graf graf--p graf-after--p\">At the time I started working on my micro-services project, VSC was quite new and there was not full support for C++ except for the syntax coloring and some very experimental integration with GDB and LLDB, but today after less than a year VSC is quite operational on the C++ development cycle, you can integrate it with CMake and build a C++ project from inside VSC and not only to use CMake but to use a C++ Debugger (GDB or LLDB) inside VSC.<\/p>\n<p id=\"1206\" class=\"graf graf--p graf-after--p\">So this article is about the steps I followed to configure VSC to work with C++, CMake and LLDB.<\/p>\n<h3 id=\"86fd\" class=\"graf graf--h3 graf-after--p\">Prerequisites<\/h3>\n<ul class=\"postList\">\n<li id=\"7872\" class=\"graf graf--li graf-after--h3\">A C++ compiler already installed, whether it is <strong class=\"markup--strong markup--li-strong\">clang<\/strong> or <strong class=\"markup--strong markup--li-strong\">gcc<\/strong>. In my case I have already installed Xcode that I use for my iOS projects so is convenient, but if you are only interested on pure C++ you can install any of the previously mentioned or both.<\/li>\n<\/ul>\n<p id=\"8353\" class=\"graf graf--p graf-after--li\"><strong class=\"markup--strong markup--p-strong\">Installed Visual Studio Code:<\/strong><\/p>\n<ul class=\"postList\">\n<li id=\"340e\" class=\"graf graf--li graf-after--p\">Download VSC <a class=\"markup--anchor markup--li-anchor\" href=\"https:\/\/code.visualstudio.com\/?utm_expid=101350005-35.Eg8306GUR6SersZwpBjURQ.0&amp;utm_referrer=https%3A%2F%2Fwww.google.com.mx%2F\" target=\"_blank\" rel=\"nofollow noopener\" data-href=\"https:\/\/code.visualstudio.com\/?utm_expid=101350005-35.Eg8306GUR6SersZwpBjURQ.0&amp;utm_referrer=https%3A%2F%2Fwww.google.com.mx%2F\">from here<\/a><\/li>\n<li id=\"462b\" class=\"graf graf--li graf-after--li\">Open VSC<\/li>\n<li id=\"5a76\" class=\"graf graf--li graf-after--li\">Launch VS Code Quick Open (<code class=\"markup--code markup--li-code\">\u2318+P<\/code>) and paste the following commands, then press enter.<\/li>\n<\/ul>\n<p id=\"80d1\" class=\"graf graf--p graf-after--li\"><strong class=\"markup--strong markup--p-strong\">To Install the Microsoft C\/C++ extension:<\/strong><\/p>\n<ul class=\"postList\">\n<li id=\"79ee\" class=\"graf graf--li graf-after--p\"><code class=\"markup--code markup--li-code\">ext install cpptools<\/code><\/li>\n<\/ul>\n<p id=\"730d\" class=\"graf graf--p graf-after--li\"><strong class=\"markup--strong markup--p-strong\">To Install CMake extension:<\/strong><\/p>\n<ul class=\"postList\">\n<li id=\"513c\" class=\"graf graf--li graf-after--p\"><code class=\"markup--code markup--li-code\">ext install cmake<\/code><\/li>\n<\/ul>\n<p id=\"d5b6\" class=\"graf graf--p graf-after--li\"><strong class=\"markup--strong markup--p-strong\">Install Native Debug extension:<\/strong><\/p>\n<ul class=\"postList\">\n<li id=\"1e49\" class=\"graf graf--li graf-after--p\"><code class=\"markup--code markup--li-code\">ext install debug<\/code><\/li>\n<\/ul>\n<h3 id=\"93a9\" class=\"graf graf--h3 graf-after--li\">Let\u2019s get started by creating a workspace in&nbsp;VSC<\/h3>\n<p id=\"a771\" class=\"graf graf--p graf-after--h3\">Create a directory where your project will reside let\u2019s say (in a very informal way) ~\/Desktop\/hello-vsc and open that directory on VSC (Command + O):<\/p>\n<figure id=\"6422\" class=\"graf graf--figure graf-after--p\">\n<div class=\"aspectRatioPlaceholder is-locked\">\n<div class=\"aspectRatioPlaceholder-fill\">&nbsp;\n<\/div>\n<div class=\"progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded\" data-image-id=\"1*-YM9v2kPMglo1I55LoMnhg.png\" data-width=\"1756\" data-height=\"1080\" data-action=\"zoom\" data-action-value=\"1*-YM9v2kPMglo1I55LoMnhg.png\" data-scroll=\"native\"><canvas class=\"progressiveMedia-canvas js-progressiveMedia-canvas\" width=\"75\" height=\"45\"><\/canvas><img decoding=\"async\" class=\"progressiveMedia-image js-progressiveMedia-image\" src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*-YM9v2kPMglo1I55LoMnhg.png?w=623&#038;ssl=1\" data-src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*-YM9v2kPMglo1I55LoMnhg.png?w=623&#038;ssl=1\" data-recalc-dims=\"1\">\n<\/div>\n<\/div>\n<\/figure>\n<p id=\"4b57\" class=\"graf graf--p graf-after--figure\">Now add the files:<\/p>\n<ul class=\"postList\">\n<li id=\"41fb\" class=\"graf graf--li graf-after--p\">CMakeLists.txt<\/li>\n<li id=\"1894\" class=\"graf graf--li graf-after--li\">hello_vsc.cpp<\/li>\n<\/ul>\n<h3 id=\"5b05\" class=\"graf graf--h3 graf-after--li\">Now lets write some&nbsp;code<\/h3>\n<p id=\"cd42\" class=\"graf graf--p graf-after--h3\">In case you wonder, CMakeLists.txt is the input file of CMake. CMake is a command line tool used to control the software compilation process and it can be used for cross-platform software development. So in micro-services land is key to be cross-platform and as of today C++ is the greatest cross-platform language of all.<\/p>\n<p id=\"4333\" class=\"graf graf--p graf-after--p\">So let\u2019s type the following code inside our CMakeLists.txt file:<\/p>\n<pre id=\"159f\" class=\"graf graf--pre graf-after--p\">cmake_minimum_required(VERSION 3.0)<\/pre>\n<pre id=\"e0a6\" class=\"graf graf--pre graf-after--pre\">project(hello-vsc)<\/pre>\n<pre id=\"d551\" class=\"graf graf--pre graf-after--pre\">set(SOURCE hello-vsc.cpp)<\/pre>\n<pre id=\"d5fc\" class=\"graf graf--pre graf-after--pre\">add_executable(${PROJECT_NAME} ${SOURCE})<\/pre>\n<p id=\"fd59\" class=\"graf graf--p graf-after--pre\">where we first make sure to use as minimum version of cmake the 3.0, then we set the project\u2019s name to \u201chello-vac\u201d, next we say that the source code of our project is in \u201chello-vsc.cpp\u201d, here you can add more files separated by one or more spaces and finally we set our executable\u2019s using the same name we use as the project name and declaring the sources code to be included during the build process. So that\u2019s it for CMake, in case you want to know more about CMake, <a class=\"markup--anchor markup--p-anchor\" href=\"https:\/\/www.johnlamp.net\/cmake-tutorial-1-getting-started.html\" target=\"_blank\" rel=\"nofollow noopener\" data-href=\"https:\/\/www.johnlamp.net\/cmake-tutorial-1-getting-started.html\">these are excellent tutorials.<\/a><\/p>\n<p id=\"2fc9\" class=\"graf graf--p graf-after--p\">Now on \u201chello-vsc.cpp\u201d type the following simple C++ code and save it:<\/p>\n<pre id=\"900b\" class=\"graf graf--pre graf-after--p\">#include &lt;iostream&gt;<\/pre>\n<pre id=\"0dc1\" class=\"graf graf--pre graf-after--pre\">int main(int argc, const char * argv[]) {\r\n    std::cout &lt;&lt; \"hello Visual Studio Code! :)\" &lt;&lt; '\\n'; \r\n    return 0;\r\n}<\/pre>\n<p id=\"5e01\" class=\"graf graf--p graf-after--pre\">Now on the editor you will notice a green squiggle under the first and only #include statement:<\/p>\n<figure id=\"fefd\" class=\"graf graf--figure graf-after--p\">\n<div class=\"aspectRatioPlaceholder is-locked\">\n<div class=\"aspectRatioPlaceholder-fill\">&nbsp;\n<\/div>\n<div class=\"progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded\" data-image-id=\"1*XTIE7YmWZwgVxL_whM69sw.png\" data-width=\"1504\" data-height=\"382\" data-action=\"zoom\" data-action-value=\"1*XTIE7YmWZwgVxL_whM69sw.png\" data-scroll=\"native\"><canvas class=\"progressiveMedia-canvas js-progressiveMedia-canvas\" width=\"75\" height=\"18\"><\/canvas><img decoding=\"async\" class=\"progressiveMedia-image js-progressiveMedia-image\" src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*XTIE7YmWZwgVxL_whM69sw.png?w=623&#038;ssl=1\" data-src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*XTIE7YmWZwgVxL_whM69sw.png?w=623&#038;ssl=1\" data-recalc-dims=\"1\">\n<\/div>\n<\/div>\n<\/figure>\n<p id=\"b96f\" class=\"graf graf--p graf-after--figure\">that means VSC cannot find the included file in this case <strong class=\"markup--strong markup--p-strong\">iostream, <\/strong>so we need to generate the file c_cpp_properties.json file and in order to do that just:<\/p>\n<ul class=\"postList\">\n<li id=\"9c4d\" class=\"graf graf--li graf-after--p\">click on the lightbulb that appears on the left side<\/li>\n<li id=\"3520\" class=\"graf graf--li graf-after--li\">click <strong class=\"markup--strong markup--li-strong\">Add include path to settings.<\/strong><\/li>\n<\/ul>\n<p id=\"3594\" class=\"graf graf--p graf-after--li\">you will be presented with a file with the following JSON source:<\/p>\n<pre id=\"d3b2\" class=\"graf graf--pre graf-after--p\">{\r\n    \"configurations\": [\r\n        {\r\n            \"name\": \"Mac\",\r\n            \"includePath\": [\"\/usr\/include\"],\r\n            \"browse\" : {\r\n                \"limitSymbolsToIncludedHeaders\" : true,\r\n                \"databaseFilename\" : \"\"\r\n            }\r\n        },\r\n        {\r\n            \"name\": \"Linux\",\r\n            \"includePath\": [\"\/usr\/include\"],\r\n            \"browse\" : {\r\n                \"limitSymbolsToIncludedHeaders\" : true,\r\n                \"databaseFilename\" : \"\"\r\n            }\r\n        },\r\n        {\r\n            \"name\": \"Win32\",\r\n            \"includePath\": [\"c:\/Program Files (x86)\/Microsoft Visual Studio 14.0\/VC\/include\"],\r\n            \"browse\" : {\r\n                \"limitSymbolsToIncludedHeaders\" : true,\r\n                \"databaseFilename\" : \"\"\r\n            }\r\n        }\r\n    ]\r\n}<\/pre>\n<p id=\"b646\" class=\"graf graf--p graf-after--pre\">given that this article is focused on Mac OS X, we will use the section labeled <strong class=\"markup--strong markup--p-strong\">\u201cname\u201d: \u201cMac\u201d<\/strong>, but what we\u2019ll do here shold be aplicable to the other platforms.<\/p>\n<p id=\"b36c\" class=\"graf graf--p graf-after--p\">The c_cpp_properties.json file generated is enough for this article but if you require to use other third party libraries, the <strong class=\"markup--strong markup--p-strong\">\u201cincludePath\u201d<\/strong> array is the place to add more paths so VSC can provide auto completion information.<\/p>\n<h3 id=\"d7fa\" class=\"graf graf--h3 graf-after--p\">Generating Tasks for CMake and&nbsp;Make<\/h3>\n<p id=\"2c7b\" class=\"graf graf--p graf-after--h3\">On VSC type \u21e7+\u2318+P and type \u201cTasks\u201d, then select the one with the name \u201cConfigure Task Runner\u201d:<\/p>\n<figure id=\"1617\" class=\"graf graf--figure graf-after--p\">\n<div class=\"aspectRatioPlaceholder is-locked\">\n<div class=\"aspectRatioPlaceholder-fill\">&nbsp;\n<\/div>\n<div class=\"progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded\" data-image-id=\"1*GLxX0q10X8xPrMjccoQavg.png\" data-width=\"1562\" data-height=\"450\" data-action=\"zoom\" data-action-value=\"1*GLxX0q10X8xPrMjccoQavg.png\" data-scroll=\"native\"><canvas class=\"progressiveMedia-canvas js-progressiveMedia-canvas\" width=\"75\" height=\"21\"><\/canvas><img decoding=\"async\" class=\"progressiveMedia-image js-progressiveMedia-image\" src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*GLxX0q10X8xPrMjccoQavg.png?w=623&#038;ssl=1\" data-src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*GLxX0q10X8xPrMjccoQavg.png?w=623&#038;ssl=1\" data-recalc-dims=\"1\">\n<\/div>\n<\/div>\n<\/figure>\n<p id=\"72c0\" class=\"graf graf--p graf-after--figure\">from the list pick the one labeled as \u201cOthers\u201d:<\/p>\n<figure id=\"0807\" class=\"graf graf--figure graf-after--p\">\n<div class=\"aspectRatioPlaceholder is-locked\">\n<div class=\"aspectRatioPlaceholder-fill\">&nbsp;\n<\/div>\n<div class=\"progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded\" data-image-id=\"1*I7zwBNA2nAjs8wQQVsJICQ.png\" data-width=\"1184\" data-height=\"478\" data-action=\"zoom\" data-action-value=\"1*I7zwBNA2nAjs8wQQVsJICQ.png\" data-scroll=\"native\"><canvas class=\"progressiveMedia-canvas js-progressiveMedia-canvas\" width=\"75\" height=\"30\"><\/canvas><img decoding=\"async\" class=\"progressiveMedia-image js-progressiveMedia-image\" src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*I7zwBNA2nAjs8wQQVsJICQ.png?w=623&#038;ssl=1\" data-src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*I7zwBNA2nAjs8wQQVsJICQ.png?w=623&#038;ssl=1\" data-recalc-dims=\"1\">\n<\/div>\n<\/div>\n<\/figure>\n<p id=\"29d4\" class=\"graf graf--p graf-after--figure\">that\u2019ll generate the \u201ctasks.json\u201d file that looks as follows:<\/p>\n<pre id=\"2a04\" class=\"graf graf--pre graf-after--p\">{\r\n    \/\/ See <a class=\"markup--anchor markup--pre-anchor\" href=\"https:\/\/go.microsoft.com\/fwlink\/?LinkId=733558\" target=\"_blank\" rel=\"nofollow noopener\" data-href=\"https:\/\/go.microsoft.com\/fwlink\/?LinkId=733558\">https:\/\/go.microsoft.com\/fwlink\/?LinkId=733558<\/a>\r\n    \/\/ for the documentation about the tasks.json format\r\n    \"version\": \"0.1.0\",\r\n    \"command\": \"echo\",\r\n    \"isShellCommand\": true,\r\n    \"args\": [\"Hello World\"],\r\n    \"showOutput\": \"always\"\r\n}<\/pre>\n<p id=\"81e3\" class=\"graf graf--p graf-after--pre\">a task file allows you to add command that can be executed from the shell in the example above generated the tasks.json file executes the command \u201cecho\u201d and pass it as argument \u201cHello World\u201d. To execute it just type:<\/p>\n<ul class=\"postList\">\n<li id=\"e308\" class=\"graf graf--li graf-after--p\">\u21e7+\u2318+P and type \u201cTasks\u201d again, but this time select the option labeled as \u201cRun Task\u201d<\/li>\n<\/ul>\n<figure id=\"c703\" class=\"graf graf--figure graf-after--li\">\n<div class=\"aspectRatioPlaceholder is-locked\">\n<div class=\"aspectRatioPlaceholder-fill\">&nbsp;\n<\/div>\n<div class=\"progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded\" data-image-id=\"1*S0s0bx7OgNeuMq6L8zTFbw.png\" data-width=\"1756\" data-height=\"494\" data-action=\"zoom\" data-action-value=\"1*S0s0bx7OgNeuMq6L8zTFbw.png\" data-scroll=\"native\"><canvas class=\"progressiveMedia-canvas js-progressiveMedia-canvas\" width=\"75\" height=\"20\"><\/canvas><img decoding=\"async\" class=\"progressiveMedia-image js-progressiveMedia-image\" src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*S0s0bx7OgNeuMq6L8zTFbw.png?w=623&#038;ssl=1\" data-src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*S0s0bx7OgNeuMq6L8zTFbw.png?w=623&#038;ssl=1\" data-recalc-dims=\"1\">\n<\/div>\n<\/div>\n<\/figure>\n<ul class=\"postList\">\n<li id=\"e372\" class=\"graf graf--li graf-after--figure\">Select only item in the list labeled as \u201cecho\u201d and you will see the output at the bottom of the editor:<\/li>\n<\/ul>\n<figure id=\"3735\" class=\"graf graf--figure graf-after--li\">\n<div class=\"aspectRatioPlaceholder is-locked\">\n<div class=\"aspectRatioPlaceholder-fill\">&nbsp;\n<\/div>\n<div class=\"progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded\" data-image-id=\"1*ZT8FX5-R9afheMMC6pH_qQ.png\" data-width=\"1158\" data-height=\"790\" data-action=\"zoom\" data-action-value=\"1*ZT8FX5-R9afheMMC6pH_qQ.png\" data-scroll=\"native\"><canvas class=\"progressiveMedia-canvas js-progressiveMedia-canvas\" width=\"75\" height=\"50\"><\/canvas><img decoding=\"async\" class=\"progressiveMedia-image js-progressiveMedia-image\" src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*ZT8FX5-R9afheMMC6pH_qQ.png?w=623&#038;ssl=1\" data-src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*ZT8FX5-R9afheMMC6pH_qQ.png?w=623&#038;ssl=1\" data-recalc-dims=\"1\">\n<\/div>\n<\/div>\n<\/figure>\n<p id=\"a443\" class=\"graf graf--p graf-after--figure\">More on tasks <a class=\"markup--anchor markup--p-anchor\" href=\"http:\/\/code.visualstudio.com\/docs\/editor\/tasks\" target=\"_blank\" rel=\"nofollow noopener\" data-href=\"http:\/\/code.visualstudio.com\/docs\/editor\/tasks\">here<\/a><\/p>\n<p id=\"62f0\" class=\"graf graf--p graf-after--p\">so now let\u2019s do something more interesting, let\u2019s modify the tasks.json file as follows:<\/p>\n<pre id=\"2a8b\" class=\"graf graf--pre graf-after--p\">{\r\n    \/\/ See <a class=\"markup--anchor markup--pre-anchor\" href=\"https:\/\/go.microsoft.com\/fwlink\/?LinkId=733558\" target=\"_blank\" rel=\"nofollow noopener\" data-href=\"https:\/\/go.microsoft.com\/fwlink\/?LinkId=733558\">https:\/\/go.microsoft.com\/fwlink\/?LinkId=733558<\/a>\r\n    \/\/ for the documentation about the tasks.json format\r\n    \"version\": \"0.1.0\",\r\n    \"command\": \"sh\",\r\n    \"isShellCommand\": true,\r\n    \"args\": [\"-c\"],\r\n    \"showOutput\": \"always\",\r\n    \"<strong class=\"markup--strong markup--pre-strong\">options<\/strong>\": {\r\n        \"<strong class=\"markup--strong markup--pre-strong\">cwd<\/strong>\": \"${workspaceRoot}\/build\"\r\n    },\r\n    \"<strong class=\"markup--strong markup--pre-strong\">tasks<\/strong>\": [\r\n        {\r\n            \"taskName\": \"<strong class=\"markup--strong markup--pre-strong\">cmake<\/strong>\",\r\n            \"args\": [\"cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Debug ..\"]     \r\n        },\r\n        {\r\n            \"taskName\": \"<strong class=\"markup--strong markup--pre-strong\">make<\/strong>\",\r\n            \"args\": [\"make -j 8\"],\r\n            \"isBuildCommand\": true            \r\n        }\r\n    ]\r\n}<\/pre>\n<p id=\"257a\" class=\"graf graf--p graf-after--pre\">the interesting part in our case is the the <strong class=\"markup--strong markup--p-strong\">\u201coptions\u201d<\/strong> section where is used the property <strong class=\"markup--strong markup--p-strong\">\u201ccwd\u201d<\/strong> (current working directory) and the substitution variable \u201c<strong class=\"markup--strong markup--p-strong\">${workspaceRoot}<\/strong>\u201d, this variable contains the path to the folder where we load our project in VSC. We concat the \u201c<strong class=\"markup--strong markup--p-strong\">build<\/strong>\u201d directory which should be created under our project\u2019s root directory:<\/p>\n<pre id=\"1d12\" class=\"graf graf--pre graf-after--p\">$ cd hello-vsc\r\n$ mkdir build\r\n$ ls -l<\/pre>\n<pre id=\"5541\" class=\"graf graf--pre graf-after--pre\">-rw-r--r--  1 ivanmejia  staff   125B Nov 28 08:41 CMakeLists.txt\r\ndrwxr-xr-x  6 ivanmejia  staff   204B Nov 28 08:42 <strong class=\"markup--strong markup--pre-strong\">build<\/strong>\/\r\n-rw-r--r--  1 ivanmejia  staff   136B Nov 28 10:44 hello_vsc.cpp<\/pre>\n<p id=\"70d5\" class=\"graf graf--p graf-after--pre\">then the property \u201c<strong class=\"markup--strong markup--p-strong\">tasks<\/strong>\u201d is an array of tasks we require, in this case the task \u201c<strong class=\"markup--strong markup--p-strong\">cmake<\/strong>\u201d which allows us to generate all the build files required to generate a binary executable; in this case we and the task \u201c<strong class=\"markup--strong markup--p-strong\">make<\/strong>\u201d that allows us to build our executable.<\/p>\n<p id=\"a476\" class=\"graf graf--p graf-after--p\">Finally the property \u201c<strong class=\"markup--strong markup--p-strong\">isBuildCommand<\/strong>\u201d set to true enables the task to be executed via the <strong class=\"markup--strong markup--p-strong\">Tasks: Run Build Task.<\/strong><\/p>\n<p id=\"2a1d\" class=\"graf graf--p graf-after--p\">Now to run the \u201c<strong class=\"markup--strong markup--p-strong\">cmake<\/strong>\u201d do the following:<\/p>\n<ul class=\"postList\">\n<li id=\"5ef1\" class=\"graf graf--li graf-after--p\">\u21e7+\u2318+P and type \u201cTasks\u201d and pick <strong class=\"markup--strong markup--li-strong\">\u201cRun<\/strong> <strong class=\"markup--strong markup--li-strong\">Task<\/strong>\u201d<\/li>\n<li id=\"8b93\" class=\"graf graf--li graf-after--li\">From the list pick \u201c<strong class=\"markup--strong markup--li-strong\">cmake<\/strong>\u201d and you\u2019ll see the following output<\/li>\n<\/ul>\n<pre id=\"8e39\" class=\"graf graf--pre graf-after--li\">Usage\r\n  cmake [options] &lt;path-to-source&gt;\r\n  cmake [options] &lt;path-to-existing-build&gt;\r\nSpecify a source directory to (re-)generate a build system for it in the\r\ncurrent working directory.  Specify an existing build directory to\r\nre-generate its build system.\r\nRun 'cmake --help' for more information.<\/pre>\n<p id=\"e61e\" class=\"graf graf--p graf-after--pre\">that means we are not passing correctly the arguments, that\u2019s why we need another property called \u201c<strong class=\"markup--strong markup--p-strong\">suppressTaskName<\/strong>\u201d (in tasks.json file above) and set it to true, that\u2019ll suppress the task name to be passed as part of the task and instead passing the arguments of the task, which for the case of \u201c<strong class=\"markup--strong markup--p-strong\">cmake<\/strong>\u201d are:<\/p>\n<pre id=\"5231\" class=\"graf graf--pre graf-after--p\">-G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Debug ..<\/pre>\n<p id=\"de5f\" class=\"graf graf--p graf-after--pre\">which basically instructs CMake to generate the build files and set it up to instruct the C++ compiler to avoid using optimizations and generate debug code; finally the \u201c..\u201d indicate to use the&nbsp;..\/CMakeLists.txt file as the input of CMake.<\/p>\n<p id=\"7152\" class=\"graf graf--p graf-after--p\">The arguments for the \u201c<strong class=\"markup--strong markup--p-strong\">make<\/strong>\u201d task are:<\/p>\n<pre id=\"f90a\" class=\"graf graf--pre graf-after--p\">-j 8<\/pre>\n<p id=\"8c56\" class=\"graf graf--p graf-after--pre\">basically instructs make to start building our program and use 8 jobs that can run simultaneously in each core of your computer\u2019s CPU, even when in this case this argument is not necessary you can leave it in case you have more than 8 source files, that\u2019ll make the compiler to compile all the sources in parallel assigning each source to one core and leaving the rest to other cores as soon as they get free of work.<\/p>\n<p id=\"bb07\" class=\"graf graf--p graf-after--p\">So set \u201c<strong class=\"markup--strong markup--p-strong\">suppressTaskName<\/strong>\u201d to true:<\/p>\n<pre id=\"1831\" class=\"graf graf--pre graf-after--p\">{\r\n    \/\/ See <a class=\"markup--anchor markup--pre-anchor\" href=\"https:\/\/go.microsoft.com\/fwlink\/?LinkId=733558\" target=\"_blank\" rel=\"nofollow noopener\" data-href=\"https:\/\/go.microsoft.com\/fwlink\/?LinkId=733558\">https:\/\/go.microsoft.com\/fwlink\/?LinkId=733558<\/a>\r\n    \/\/ for the documentation about the tasks.json format\r\n    \"version\": \"0.1.0\",\r\n    \"command\": \"sh\",\r\n    \"isShellCommand\": true,\r\n    \"args\": [\"-c\"],\r\n    \"showOutput\": \"always\",\r\n    \"<strong class=\"markup--strong markup--pre-strong\">suppressTaskName<\/strong>\": true,\r\n    ...<\/pre>\n<pre id=\"6925\" class=\"graf graf--pre graf-after--pre\">}<\/pre>\n<p id=\"7115\" class=\"graf graf--p graf-after--pre\">and again type \u21e7+\u2318+P and type \u201cTasks\u201d and pick <strong class=\"markup--strong markup--p-strong\">\u201cRun<\/strong> <strong class=\"markup--strong markup--p-strong\">Task<\/strong>\u201d and now you should see an output like this:<\/p>\n<pre id=\"2d27\" class=\"graf graf--pre graf-after--p\">-- The C compiler identification is AppleClang 8.0.0.8000042\r\n-- The CXX compiler identification is AppleClang 8.0.0.8000042\r\n-- Check for working C compiler: \/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/bin\/cc\r\n-- Check for working C compiler: \/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/bin\/cc -- works\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Detecting C compile features\r\n-- Detecting C compile features - done\r\n-- Check for working CXX compiler: \/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/bin\/c++\r\n-- Check for working CXX compiler: \/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/bin\/c++ -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- Detecting CXX compile features\r\n-- Detecting CXX compile features - done\r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: \/Users\/ivanmejia\/Desktop\/hello-vsc\/build<\/pre>\n<p id=\"ee22\" class=\"graf graf--p graf-after--pre\">now we have all the files necessary to build our project under our&nbsp;.\/build directory.<\/p>\n<ul class=\"postList\">\n<li id=\"b755\" class=\"graf graf--li graf-after--p\">Now again type \u21e7+\u2318+P and type \u201cTasks\u201d and but this time pick <strong class=\"markup--strong markup--li-strong\">\u201cRun Build<\/strong> <strong class=\"markup--strong markup--li-strong\">Task<\/strong>\u201d<\/li>\n<li id=\"1173\" class=\"graf graf--li graf-after--li\">From the list pick \u201c<strong class=\"markup--strong markup--li-strong\">make<\/strong>\u201d and you should see the following output:<\/li>\n<\/ul>\n<pre id=\"13f8\" class=\"graf graf--pre graf-after--li\">Scanning dependencies of target hello-vsc\r\n[ 50%] Building CXX object CMakeFiles\/hello-vsc.dir\/hello_vsc.cpp.o\r\n[100%] Linking CXX executable hello-vsc\r\n[100%] Built target hello-vsc<\/pre>\n<p id=\"3e06\" class=\"graf graf--p graf-after--pre\">now on your terminal window go to&nbsp;.\/hello-vsc\/build and type the executable\u2019s name and you should see it output:<\/p>\n<pre id=\"d4f6\" class=\"graf graf--pre graf-after--p\">$ .\/hello-vsc\r\nhello Visual Studio Code! :)<\/pre>\n<p id=\"ea49\" class=\"graf graf--p graf-after--pre\">So there you have your code being buld through CMake from within VSC.<\/p>\n<h3 id=\"0a3e\" class=\"graf graf--h3 graf-after--p\">Now let\u2019s debug our code using LLDB inside&nbsp;VSC.<\/h3>\n<p id=\"9fd1\" class=\"graf graf--p graf-after--h3\">We need to configure our project to use the debugger so let\u2019s follow these simple steps:<\/p>\n<ul class=\"postList\">\n<li id=\"384c\" class=\"graf graf--li graf-after--p\">On VSC click on the little bug icon on the Sidebar<\/li>\n<li id=\"dfa6\" class=\"graf graf--li graf-after--li\">Click the Configure Icon on the Debug View (the little gear with a red badge on it):<\/li>\n<\/ul>\n<figure id=\"93ab\" class=\"graf graf--figure graf-after--li\">\n<div class=\"aspectRatioPlaceholder is-locked\">\n<div class=\"aspectRatioPlaceholder-fill\">&nbsp;\n<\/div>\n<div class=\"progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded\" data-image-id=\"1*tGAvtjjptVB0aVP8V0gNWA.png\" data-width=\"1756\" data-height=\"466\" data-action=\"zoom\" data-action-value=\"1*tGAvtjjptVB0aVP8V0gNWA.png\" data-scroll=\"native\"><canvas class=\"progressiveMedia-canvas js-progressiveMedia-canvas\" width=\"75\" height=\"18\"><\/canvas><img decoding=\"async\" class=\"progressiveMedia-image js-progressiveMedia-image\" src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*tGAvtjjptVB0aVP8V0gNWA.png?w=623&#038;ssl=1\" data-src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*tGAvtjjptVB0aVP8V0gNWA.png?w=623&#038;ssl=1\" data-recalc-dims=\"1\">\n<\/div>\n<\/div>\n<\/figure>\n<ul class=\"postList\">\n<li id=\"2708\" class=\"graf graf--li graf-after--figure\">From the list select LLDB (these steps apply for other C\/C++ debuggers as well). That\u2019ll generate a new file called launch.json. By the way, in case you wonder where all these files (c_cpp_properties.json, tasks.json and launch.json) are stored, if you look on your terminal you will see a&nbsp;.\/.vscode directory, which is where all those files are stored.<\/li>\n<\/ul>\n<pre id=\"d3c5\" class=\"graf graf--pre graf-after--li\">$ .<strong class=\"markup--strong markup--pre-strong\">\/hello-vsc\/.vscode<\/strong>$ ls -l<\/pre>\n<pre id=\"c110\" class=\"graf graf--pre graf-after--pre\">total 24<\/pre>\n<pre id=\"879f\" class=\"graf graf--pre graf-after--pre\">-rw-r--r--  1 ivanmejia  staff   771B Nov 28 10:15 c_cpp_properties.json\r\n-rw-r--r--  1 ivanmejia  staff   250B Nov 28 15:45 launch.json\r\n-rw-r--r--  1 ivanmejia  staff   625B Nov 28 15:28 tasks.json<\/pre>\n<ul class=\"postList\">\n<li id=\"358b\" class=\"graf graf--li graf-after--pre\">Your new generated launch.json file should look like this:<\/li>\n<\/ul>\n<pre id=\"0ddd\" class=\"graf graf--pre graf-after--li\">{\r\n    \"version\": \"0.2.0\",\r\n    \"configurations\": [\r\n        {\r\n            \"name\": \"Debug\",\r\n            \"type\": \"lldb-mi\",\r\n            \"request\": \"launch\",\r\n            \"<strong class=\"markup--strong markup--pre-strong\">target<\/strong>\": \".\/bin\/executable\",\r\n            \"cwd\": \"${workspaceRoot}\"\r\n        }\r\n    ]\r\n}<\/pre>\n<ul class=\"postList\">\n<li id=\"7b7f\" class=\"graf graf--li graf-after--pre\">Let\u2019s modify the \u201c<strong class=\"markup--strong markup--li-strong\">target<\/strong>\u201d property like this:<\/li>\n<\/ul>\n<pre id=\"add8\" class=\"graf graf--pre graf-after--li\">\"<strong class=\"markup--strong markup--pre-strong\">target<\/strong>\": \".\/bin\/hello-vsc\"<\/pre>\n<p id=\"42f9\" class=\"graf graf--p graf-after--pre\">that\u2019ll make the debugger run and attach to our executable inside VSC.<\/p>\n<ul class=\"postList\">\n<li id=\"88bd\" class=\"graf graf--li graf-after--p\">Finally you need to add to your PATH the location of the lldb-mi dibbuger, which in case you have Xcode installed should be:<\/li>\n<\/ul>\n<pre id=\"99e4\" class=\"graf graf--pre graf-after--li\">\/Applications\/Xcode.app\/Contents\/Developer\/usr\/bin\/<\/pre>\n<ul class=\"postList\">\n<li id=\"d94d\" class=\"graf graf--li graf-after--pre\">once you add to your PATH on your&nbsp;.bash_profile the location of the lldb-mi debugger just re-launch VSC and you should be able to debug your code by just clicking the \u201c<strong class=\"markup--strong markup--li-strong\">Start Debugging (F5)<\/strong>\u201d button in the Debug View:<\/li>\n<\/ul>\n<figure id=\"9a24\" class=\"graf graf--figure graf-after--li\">\n<div class=\"aspectRatioPlaceholder is-locked\">\n<div class=\"aspectRatioPlaceholder-fill\">&nbsp;\n<\/div>\n<div class=\"progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded\" data-image-id=\"1*1M4-rBDZ2kpaSiTaItCh9w.png\" data-width=\"1744\" data-height=\"410\" data-action=\"zoom\" data-action-value=\"1*1M4-rBDZ2kpaSiTaItCh9w.png\" data-scroll=\"native\"><canvas class=\"progressiveMedia-canvas js-progressiveMedia-canvas\" width=\"75\" height=\"17\"><\/canvas><img decoding=\"async\" class=\"progressiveMedia-image js-progressiveMedia-image\" src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*1M4-rBDZ2kpaSiTaItCh9w.png?w=623&#038;ssl=1\" data-src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1*1M4-rBDZ2kpaSiTaItCh9w.png?w=623&#038;ssl=1\" data-recalc-dims=\"1\">\n<\/div>\n<\/div>\n<\/figure>\n<p id=\"9dd8\" class=\"graf graf--p graf-after--figure\">So this is it, you have a C++ project being build with CMake and Debugged using LLDB on Mac OS X all inside Visual Studio Code. I hope this helps you.<\/p>\n<p id=\"b173\" class=\"graf graf--p graf-after--p graf--trailing\">I had to dig into various places to come with this solution and finally this looks promising as a confortable cross-platform development environment for C\/C++ developers like me. ?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>this article are captured as &#8220;https:\/\/medium.com\/audelabs\/c-development-using-visual-studio-code-cmake-and-lldb-d0f13d38c563&#8220; &nbsp; I\u2019ve been working for almost a year implementing micro-services on C++11 running as Docker containers. Through my journey I\u2019ve seen to emerge quite a bunch of interesting tools to work with C++ on this field (micro-services and Docker). I started using Xcode on Mac OS X (now macOS). Even when Xcode is a fine tool to work on a C++ project, with a very appealing UI and an not a super good debugging experience but useful IMHO, it has a really annoying feature: it is constantly indexing the code while I\u2019m typing it and, in consequence, spinning my MacBook Pro\u2019s fans up to 5000 rpm and making it really hot. I tried disabling all code completion options in preferences without any success. This made me think about returning to Emacs which, even when I used it in the past, I would say I\u2019m not an expert and re-loading it in my brain will take me some time to interiorize the shortcut keys and so on, so I thought about looking for something similar but modern, for that I passed through TextMate, Atom, Sublime and Visual Studio Code. Visual Studio Code (VSC from now [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"ngg_post_thumbnail":0,"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[40],"tags":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5q9Zn-j3","jetpack-related-posts":[{"id":899,"url":"https:\/\/blog.box.kr\/?p=899","url_meta":{"origin":1181,"position":0},"title":"Cassandra cpp driver install","date":"2015-06-16","format":false,"excerpt":"http:\/\/datastax.github.io\/cpp-driver\/topics\/building\/ \u00a0 Building Supported Platforms The driver is known to work on CentOS\/RHEL 5\/6\/7, Mac OS X 10.8\/10.9 (Mavericks and Yosemite), Ubuntu 12.04\/14.04 LTS, and Windows 7 SP1. It has been built using GCC 4.1.2+, Clang 3.4+, and MSVC 2010\/2012\/2013. Dependencies Driver CMake libuv (1.x or 0.10.x) OpenSSL (optional) NOTE:\u2026","rel":"","context":"In &quot;\uae30\uc220&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":890,"url":"https:\/\/blog.box.kr\/?p=890","url_meta":{"origin":1181,"position":1},"title":"CMAKE compile options and etc options","date":"2015-06-11","format":false,"excerpt":"cmake -G \"Unix Makefiles\" -DCMAKE_INSTALL_PREFIX=`pwd`\/install -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_C_COMPILER=`xcrun -f clang` -DCMAKE_CXX_COMPILER=`xcrun -f clang++` -DwxWidgets_CONFIG_EXECUTABLE=..\/..\/..\/wxWidgets\/install\/bin\/wx-config -DwxWidgets_COMPONENTS=\"stc;html;aui;adv;core;net;base\" -DwxLuaBind_COMPONENTS=\"stc;html;aui;adv;core;net;base\" -DwxLua_LUA_LIBRARY_USE_BUILTIN=FALSE -DwxLua_LUA_LIBRARY_VERSION=5.2 -DBUILD_USE_PRECOMPILED_HEADERS=FALSE -DCMAKE_CXX_FLAGS='-std=c++11 -stdlib=libc++ -Wno-c++11-narrowing' -DwxLua_LUA_LIBRARY_USE_BUILTIN=TRUE -DwxLua_LUA_LIBRARY_BUILD_SHARED=TRUE \u00a0 fin.","rel":"","context":"In &quot;C\/C++&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":883,"url":"https:\/\/blog.box.kr\/?p=883","url_meta":{"origin":1181,"position":2},"title":"how to make debug build on cmake","date":"2015-06-10","format":false,"excerpt":"cmake -DCMAKE_BUILD_TYPE:STRING=Debug \u00a0","rel":"","context":"In &quot;cmake\/make&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1125,"url":"https:\/\/blog.box.kr\/?p=1125","url_meta":{"origin":1181,"position":3},"title":"POCO \uc0ac\uc6a9\ud560\ub54c &#8220;error C3861: &#8216;CreateEvent&#8217; : identifier not found&#8221;.  \uc624\ub958 \ubc1c\uc0dd.","date":"2016-07-20","format":false,"excerpt":"POCO \ub77c\uc774\ube0c\ub7ec\ub9ac \uc0ac\uc6a9\ud558\uba74\uc11c CreateEvent \ud568\uc218\ub97c \uc0ac\uc6a9\ud558\uba74 \"error C3861: 'CreateEvent' : identifier not found\". \u00a0 \uc774\ub7f0 \uc624\ub958\uac00 \ubc1c\uc0dd \ud568. \u00a0 \ud574\uacb0\ucc45\uc740 \u00a0 Either directly in your code: #define POCO_NO_UNWINDOWS or as a compiler flag: \/D POCO_NO_UNWINDOWS or in CMake: add_definitions(\"\/D POCO_NO_UNWINDOWS\") \u00a0 \uc774\ub807\uac8c \ucc98\ub9ac \ud558\uba74.. \ubb38\uc81c \uc5c6\uc774 \ucef4\ud30c\uc77c \ub428. \u00a0 \u00a0\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1239,"url":"https:\/\/blog.box.kr\/?p=1239","url_meta":{"origin":1181,"position":4},"title":"Flutter \uc0ac\uc6a9 \uc815\ub9ac","date":"2021-05-14","format":false,"excerpt":"OSX, Windows, Linux, Web\uc5d0\uc11c \uc0ac\uc6a9\ud558\uae30 \uc704\ud574\uc11c\ub294 \uac01 \uae30\ub2a5\uc744 \ucf1c\uc918\uc57c\ud568. Flutter\ub85c \ub370\uc2a4\ud06c\ud1b1 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uac1c\ubc1c \uc2dc\uc791\ud558\uae30 \uc77c\ud68c\uc131 \uad6c\uc131 \ubcc0\uacbd\uc73c\ub85c \ub370\uc2a4\ud06c\ud1b1 \uc9c0\uc6d0\uc744 \uad6c\uc131\ud574\uc57c\ud569\ub2c8\ub2e4.$ flutter config --enable-windows-desktop # for the Windows runner$ flutter config --enable-macos-desktop \u00a0 # for the macOS runner$ flutter config --enable-linux-desktop \u00a0 # for the Linux runner \ub370\uc2a4\ud06c\ud1b1 \uc6a9 Flutter\uac00 \ud65c\uc131\ud654\ub418\uc5c8\ub294\uc9c0\u2026","rel":"","context":"In &quot;flutter&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":953,"url":"https:\/\/blog.box.kr\/?p=953","url_meta":{"origin":1181,"position":5},"title":"How to install openssl on windows with visual studio 2015","date":"2015-08-26","format":false,"excerpt":"cite from\u00a0http:\/\/developer.covenanteyes.com\/building-openssl-for-visual-studio\/ and some edit.. ================================================== \u00a0 You need to install\u2026 Visual Studio 2015 (this will likely work with older versions as well) ActivePerl 1 Latest version of OpenSSL source-code 2\u00a0or $ git clone git:\/\/git.openssl.org\/openssl.git $ cd openssl $ git config core.autocrlf false $ git config core.eol lf $ git\u2026","rel":"","context":"In &quot;\uae30\uc220&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/1181"}],"collection":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1181"}],"version-history":[{"count":1,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/1181\/revisions"}],"predecessor-version":[{"id":1182,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/1181\/revisions\/1182"}],"wp:attachment":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}