{"id":463571,"date":"2025-06-16T15:02:20","date_gmt":"2025-06-16T15:02:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=463571"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=463571","title":{"rendered":"<span>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 C++ \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 GDB \u0432 VSCode<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 C++ \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 GDB \u0432 VSCode<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u043d\u0430\u0434 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u043d\u0430 C++, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u0438\u043c\u0438, \u0433\u0434\u0435 \u0432\u0430\u0436\u043d\u0430 \u0441\u0442\u0440\u043e\u0433\u0430\u044f \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0442\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0433\u0434\u0430 Microsoft Visual Studio (MSVS) \u0441\u0430\u043c\u0430 &#171;\u043f\u043e\u0434\u0447\u0438\u0449\u0430\u0435\u0442&#187; \u0437\u0430 \u0432\u0430\u043c\u0438 \u0442\u0438\u043f\u044b \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043b\u0438\u0448\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u0418\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043d\u043e \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u0448\u0430\u0442\u044c.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0441 MSVC \u043d\u0430 <strong>MinGW<\/strong>, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c <strong>CMake<\/strong> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>GDB<\/strong> \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0432\u0430\u0448\u0435\u0433\u043e C++-\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u0440\u044f\u043c\u043e \u0432 <strong>Visual Studio Code<\/strong>.<\/p>\n<hr\/>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c MinGW?<\/h3>\n<p>\u0420\u0430\u043d\u044c\u0448\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b MSVC, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0448\u0451\u043b &#171;\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438&#187; \u0441 Windows \u0438 Visual Studio. \u041d\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043e\u043d \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430 \u043c\u0435\u043d\u044f: \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0442\u0438\u043f\u044b, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0434\u0430\u0451\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c <strong>MinGW<\/strong> \u2014 \u043f\u043e\u0440\u0442 GCC \u0434\u043b\u044f Windows. \u041e\u043d \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u043d\u043e\u0439:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c GNU Toolchain;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434;<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u043b\u0435\u0437\u0435\u0442 \u0432 \u043a\u043e\u0434 \u0441\u0430\u043c \u2014 \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043f\u043e\u0434 \u0432\u0430\u0448\u0438\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 <strong>GDB<\/strong> \u2014 \u043c\u043e\u0449\u043d\u044b\u0439 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 VSCode.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GDB \u0441\u0442\u0430\u043b\u0430 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u0441 MSVC \u043d\u0430 MinGW \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0432\u043e\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <code>ModernString\u0421++<\/code> ( <a href=\"https:\/\/github.com\/zeroqxq\/MStringCPP\" rel=\"noopener noreferrer nofollow\">Github<\/a> ).<\/p>\n<hr\/>\n<h3>\u0428\u0430\u0433 1: \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 CMake \u043f\u043e\u0434 MinGW<\/h3>\n<p>\u0414\u043e \u044d\u0442\u043e\u0433\u043e \u044f \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">cd build cmake .. cmake --build . --config Release<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 (\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440) MSVC. \u0427\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 MinGW, \u043d\u0443\u0436\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">cmake -B build -G \"MinGW Makefiles\" -DCMAKE_BUILD_TYPE=Debug cmake --build . --config Debug<\/code><\/pre>\n<h4>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<\/h4>\n<ul>\n<li>\n<p><code>-B build<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0444\u0430\u0439\u043b\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>build<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>-G \"MinGW Makefiles\"<\/code> \u0433\u043e\u0432\u043e\u0440\u0438\u0442 CMake, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e MinGW;<\/p>\n<\/li>\n<li>\n<p><code>-DCMAKE_BUILD_TYPE=Debug<\/code> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0440\u0435\u0436\u0438\u043c \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u0447\u0442\u043e\u0431\u044b GDB \u043c\u043e\u0433 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0440\u0435\u043b\u0438\u0437\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 <code>Debug<\/code> \u043d\u0430 <code>Release<\/code>.<\/p>\n<\/blockquote>\n<hr\/>\n<h3>\u0428\u0430\u0433 2: \u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a CMake \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443:<\/p>\n<pre><code class=\"bash\">cmake --build build --config Debug<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 Release-\u0441\u0431\u043e\u0440\u043a\u0443, \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0433\u043e \u044f\u0432\u043d\u043e:<\/p>\n<pre><code class=\"bash\">cmake --build build --config Release<\/code><\/pre>\n<hr\/>\n<h3>\u0428\u0430\u0433 3: \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c GDB \u0432 VSCode<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0431\u0440\u0430\u043d \u0441 \u0444\u043b\u0430\u0433\u0430\u043c\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u043f\u043e\u0440\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c GDB. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438\u0441\u044c:<\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 <strong>MinGW-w64<\/strong> (\u0438\u043b\u0438 MSYS2);<\/p>\n<\/li>\n<li>\n<p><strong>GDB<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0434\u0451\u0442 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 MinGW;<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 <strong>C\/C++<\/strong> \u0432 Visual Studio Code.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f .vscode\/launch.json<\/h4>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0441\u0432\u043e\u0439 <code>launch.json<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0431\u043b\u043e\u043a:<\/p>\n<pre><code class=\"json\">{     \"name\": \"(gdb) \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\",     \"type\": \"cppdbg\",     \"request\": \"launch\",     \"program\": \"${workspaceFolder}\/build\/ModernString.exe\",     \"args\": [],     \"stopAtEntry\": false,     \"cwd\": \"${workspaceFolder}\/build\",     \"environment\": [],     \"externalConsole\": false,     \"MIMode\": \"gdb\",     \"miDebuggerPath\": \"C:\/msys64\/mingw64\/bin\/gdb.exe\" \/\/ \u041f\u0443\u0442\u044c \u0434\u043e \u0434\u0435\u0431\u0430\u0433\u0435\u0440\u0440\u0430  } <\/code><\/pre>\n<blockquote>\n<p>\u26a0\ufe0f \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0443\u0442\u044c \u043a <code>gdb.exe<\/code>. \u0423 \u0432\u0430\u0441 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430. \u0418\u0449\u0438\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 win + S (\u041d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442). \u042f \u043b\u0438\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 Everything<\/p>\n<\/blockquote>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 GDB \u043a\u0430\u043a \u0434\u0432\u0438\u0436\u043e\u043a \u043e\u0442\u043b\u0430\u0434\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 <code>build<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b (\u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 VSCode);<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0442\u043e\u0447\u043a\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430, \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435?<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u0448\u0430\u0433\u043e\u0432 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 GDB;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 C++;<\/p>\n<\/li>\n<li>\n<p>\u0427\u0438\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f CMake.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u0437\u0430\u043c\u0435\u0442\u043a\u0443<\/h3>\n<ul>\n<li>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e GDB \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435:<\/p>\n<pre><code class=\"bash\">gdb --version<\/code><\/pre>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043b\u0438 <code>mingw32-make<\/code> \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f PATH.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u2014 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 CMake \u0438 MinGW, \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>tasks.json<\/code> \u0432 \u043f\u0430\u043f\u043a\u0435 <code>.vscode<\/code>.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u0413\u0434\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/cmake.org\/documentation\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f CMake<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/mingw-w64.org\/doku.php\" rel=\"noopener noreferrer nofollow\">MinGW-w64 Documentation<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/sourceware.org\/gdb\/current\/onlinedocs\/gdb\/\" rel=\"noopener noreferrer nofollow\">GDB Manual<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.cpptools\" rel=\"noopener noreferrer nofollow\">C\/C++ Extension for VSCode<\/a><\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 MSVC \u043d\u0430 MinGW \u0434\u0430\u043b \u043c\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GDB \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043c\u043e\u0449\u043d\u044b\u0445 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u043e\u0432 \u0434\u043b\u044f C++. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 \u0441\u0432\u043e\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u0434\u0435.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0432\u0430\u043c \u043f\u043e\u043c\u043e\u0433\u043b\u0430 \u2014 \u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043b\u0430\u0439\u043a \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043c\u043e\u0439 \u043a\u0430\u043d\u0430\u043b.<br \/>\u0412\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u043e\u0432\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u2014 \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/918878\/\"> https:\/\/habr.com\/ru\/articles\/918878\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 C++ \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 GDB \u0432 VSCode<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u043d\u0430\u0434 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u043d\u0430 C++, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u0438\u043c\u0438, \u0433\u0434\u0435 \u0432\u0430\u0436\u043d\u0430 \u0441\u0442\u0440\u043e\u0433\u0430\u044f \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0442\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0433\u0434\u0430 Microsoft Visual Studio (MSVS) \u0441\u0430\u043c\u0430 &#171;\u043f\u043e\u0434\u0447\u0438\u0449\u0430\u0435\u0442&#187; \u0437\u0430 \u0432\u0430\u043c\u0438 \u0442\u0438\u043f\u044b \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043b\u0438\u0448\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u0418\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043d\u043e \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u0448\u0430\u0442\u044c.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0441 MSVC \u043d\u0430 <strong>MinGW<\/strong>, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c <strong>CMake<\/strong> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>GDB<\/strong> \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0432\u0430\u0448\u0435\u0433\u043e C++-\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u0440\u044f\u043c\u043e \u0432 <strong>Visual Studio Code<\/strong>.<\/p>\n<hr\/>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c MinGW?<\/h3>\n<p>\u0420\u0430\u043d\u044c\u0448\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b MSVC, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0448\u0451\u043b &#171;\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438&#187; \u0441 Windows \u0438 Visual Studio. \u041d\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043e\u043d \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430 \u043c\u0435\u043d\u044f: \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0442\u0438\u043f\u044b, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0434\u0430\u0451\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c <strong>MinGW<\/strong> \u2014 \u043f\u043e\u0440\u0442 GCC \u0434\u043b\u044f Windows. \u041e\u043d \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u043d\u043e\u0439:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c GNU Toolchain;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434;<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u043b\u0435\u0437\u0435\u0442 \u0432 \u043a\u043e\u0434 \u0441\u0430\u043c \u2014 \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043f\u043e\u0434 \u0432\u0430\u0448\u0438\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 <strong>GDB<\/strong> \u2014 \u043c\u043e\u0449\u043d\u044b\u0439 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 VSCode.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GDB \u0441\u0442\u0430\u043b\u0430 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u0441 MSVC \u043d\u0430 MinGW \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0432\u043e\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <code>ModernString\u0421++<\/code> ( <a href=\"https:\/\/github.com\/zeroqxq\/MStringCPP\" rel=\"noopener noreferrer nofollow\">Github<\/a> ).<\/p>\n<hr\/>\n<h3>\u0428\u0430\u0433 1: \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 CMake \u043f\u043e\u0434 MinGW<\/h3>\n<p>\u0414\u043e \u044d\u0442\u043e\u0433\u043e \u044f \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">cd build cmake .. cmake --build . --config Release<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 (\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440) MSVC. \u0427\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 MinGW, \u043d\u0443\u0436\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">cmake -B build -G \"MinGW Makefiles\" -DCMAKE_BUILD_TYPE=Debug cmake --build . --config Debug<\/code><\/pre>\n<h4>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<\/h4>\n<ul>\n<li>\n<p><code>-B build<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0444\u0430\u0439\u043b\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>build<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>-G \"MinGW Makefiles\"<\/code> \u0433\u043e\u0432\u043e\u0440\u0438\u0442 CMake, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e MinGW;<\/p>\n<\/li>\n<li>\n<p><code>-DCMAKE_BUILD_TYPE=Debug<\/code> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0440\u0435\u0436\u0438\u043c \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u0447\u0442\u043e\u0431\u044b GDB \u043c\u043e\u0433 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0440\u0435\u043b\u0438\u0437\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 <code>Debug<\/code> \u043d\u0430 <code>Release<\/code>.<\/p>\n<\/blockquote>\n<hr\/>\n<h3>\u0428\u0430\u0433 2: \u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a CMake \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443:<\/p>\n<pre><code class=\"bash\">cmake --build build --config Debug<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 Release-\u0441\u0431\u043e\u0440\u043a\u0443, \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0433\u043e \u044f\u0432\u043d\u043e:<\/p>\n<pre><code class=\"bash\">cmake --build build --config Release<\/code><\/pre>\n<hr\/>\n<h3>\u0428\u0430\u0433 3: \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c GDB \u0432 VSCode<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0431\u0440\u0430\u043d \u0441 \u0444\u043b\u0430\u0433\u0430\u043c\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u043f\u043e\u0440\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c GDB. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438\u0441\u044c:<\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 <strong>MinGW-w64<\/strong> (\u0438\u043b\u0438 MSYS2);<\/p>\n<\/li>\n<li>\n<p><strong>GDB<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0434\u0451\u0442 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 MinGW;<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 <strong>C\/C++<\/strong> \u0432 Visual Studio Code.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f .vscode\/launch.json<\/h4>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0441\u0432\u043e\u0439 <code>launch.json<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0431\u043b\u043e\u043a:<\/p>\n<pre><code class=\"json\">{     \"name\": \"(gdb) \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\",     \"type\": \"cppdbg\",     \"request\": \"launch\",     \"program\": \"${workspaceFolder}\/build\/ModernString.exe\",     \"args\": [],     \"stopAtEntry\": false,     \"cwd\": \"${workspaceFolder}\/build\",     \"environment\": [],     \"externalConsole\": false,     \"MIMode\": \"gdb\",     \"miDebuggerPath\": \"C:\/msys64\/mingw64\/bin\/gdb.exe\" \/\/ \u041f\u0443\u0442\u044c \u0434\u043e \u0434\u0435\u0431\u0430\u0433\u0435\u0440\u0440\u0430  } <\/code><\/pre>\n<blockquote>\n<p>\u26a0\ufe0f \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0443\u0442\u044c \u043a <code>gdb.exe<\/code>. \u0423 \u0432\u0430\u0441 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430. \u0418\u0449\u0438\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 win + S (\u041d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442). \u042f \u043b\u0438\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 Everything<\/p>\n<\/blockquote>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 GDB \u043a\u0430\u043a \u0434\u0432\u0438\u0436\u043e\u043a \u043e\u0442\u043b\u0430\u0434\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 <code>build<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b (\u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 VSCode);<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0442\u043e\u0447\u043a\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430, \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435?<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u0448\u0430\u0433\u043e\u0432 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 GDB;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 C++;<\/p>\n<\/li>\n<li>\n<p>\u0427\u0438\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f CMake.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u0437\u0430\u043c\u0435\u0442\u043a\u0443<\/h3>\n<ul>\n<li>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e GDB \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435:<\/p>\n<pre><code class=\"bash\">gdb --version<\/code><\/pre>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043b\u0438 <code>mingw32-make<\/code> \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f PATH.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u2014 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 CMake \u0438 MinGW, \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>tasks.json<\/code> \u0432 \u043f\u0430\u043f\u043a\u0435 <code>.vscode<\/code>.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u0413\u0434\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/cmake.org\/documentation\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f CMake<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/mingw-w64.org\/doku.php\" rel=\"noopener noreferrer nofollow\">MinGW-w64 Documentation<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/sourceware.org\/gdb\/current\/onlinedocs\/gdb\/\" rel=\"noopener noreferrer nofollow\">GDB Manual<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.cpptools\" rel=\"noopener noreferrer nofollow\">C\/C++ Extension for VSCode<\/a><\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 MSVC \u043d\u0430 MinGW \u0434\u0430\u043b \u043c\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GDB \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043c\u043e\u0449\u043d\u044b\u0445 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u043e\u0432 \u0434\u043b\u044f C++. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 \u0441\u0432\u043e\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u0434\u0435.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0432\u0430\u043c \u043f\u043e\u043c\u043e\u0433\u043b\u0430 \u2014 \u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043b\u0430\u0439\u043a \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043c\u043e\u0439 \u043a\u0430\u043d\u0430\u043b.<br \/>\u0412\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u043e\u0432\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u2014 \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/918878\/\"> https:\/\/habr.com\/ru\/articles\/918878\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-463571","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/463571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=463571"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/463571\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=463571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=463571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=463571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}