{"id":18435,"date":"2018-03-13T11:13:10","date_gmt":"2018-03-13T18:13:10","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/?p=18435"},"modified":"2019-04-17T00:50:34","modified_gmt":"2019-04-17T00:50:34","slug":"linux-c-workload-improvements-to-the-project-system-linux-console-window-rsync-and-attach-to-process","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/linux-c-workload-improvements-to-the-project-system-linux-console-window-rsync-and-attach-to-process\/","title":{"rendered":"Linux C++ Workload improvements to the Project System, Linux Console Window, rsync and Attach to Process"},"content":{"rendered":"<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/c\/2018\/03\/23\/linux\u9879\u76ee\u7cfb\u7edf%ef%bc%8clinux\u63a7\u5236\u53f0\u7a97\u53e3%ef%bc%8c\u540c\u6b65\u548c\u9644\u52a0\u5230\u8fdb\u7a0b\u7684linux-c\/\">\u70b9\u8fd9\u91cc\u770b\u4e2d\u6587\u7248<\/a><\/p>\n<p><span style=\"font-family: Calibri\"><span style=\"color: #000000\">In <\/span><a target=\"_blank\" href=\"https:\/\/www.visualstudio.com\/vs\/preview\/\" rel=\"noopener\">Visual Studio 2017 15.7 Preview 1<\/a><span style=\"color: #000000\"> we have made a number of improvements to our support to the Linux C++ workload based on your feedback. You can <\/span><a href=\"http:\/\/aka.ms\/vslinux\">learn more about our Linux C++ workload in Visual Studio here<\/a><\/span><span style=\"color: #000000;font-family: Calibri\">.<\/span><\/p>\n<h2><span style=\"color: #2f5496;font-family: Calibri Light;font-size: large\">MSBuild Project System improvements<\/span><\/h2>\n<p><span style=\"color: #000000;font-family: Calibri\">We added some new properties to Linux projects on the C\/C++ General properties page. Max Parallel Compilation Jobs allows you to launch additional compilation processes. The default is 1 but can be increased to improve your build throughput. Public Project Include Directories allows you to specify directories in your project you want exposed to other projects in your solution. In the consuming project, add a reference to the project that exposed its include directories and now you can reference them from your source. <\/span><\/p>\n<h2><span style=\"color: #2f5496;font-family: Calibri Light;font-size: large\">Linux Console Window improvements<\/span><\/h2>\n<p><span style=\"color: #000000;font-family: Calibri\">Now on launch or debug of a Linux project the Linux console window will be displayed. If you dock this window the position will be remembered on subsequent launches. When you return from debug mode the window will be closed. We also fixed our handling of echo on\/off to properly display messages from the remote system.<\/span><\/p>\n<h2><span style=\"color: #2f5496;font-family: Calibri Light;font-size: large\">Rsync improvements for CMake and open folder<\/span><\/h2>\n<p><span style=\"color: #000000;font-family: Calibri\">Our rsync support in open folder and CMake scenarios has also seen some improvements.<span>\u00a0 <\/span>Previously rsync would run to completion even if you had cancelled the task that started it, this has been fixed. If rsync is triggered by a build for example and you cancel the build rsync will now cancel execution. <span>\u00a0<\/span>We\u2019ve also made some performance improvements and enabled rsync with root users. You can also now pass additional command arguments to rsync using the <\/span><span style=\"margin: 0px;color: black;font-family: 'Segoe UI',sans-serif;font-size: 10pt\">rsyncCommandArgs <\/span><span style=\"color: #000000;font-family: Calibri\">option in CMakeSettings.json.<\/span><\/p>\n<h2><span style=\"color: #2f5496;font-family: Calibri Light;font-size: large\">Attach to Process improvements<\/span><\/h2>\n<p><span style=\"color: #000000;font-family: Calibri\">You have given us feedback regarding the need to have more control over the Attach to Process scenario for remote Linux debugging. We\u2019ve added a lot of the controls that are possible through normal debug launch settings for Linux projects or Open Folder, such as enabling child process debugging, pre attach commands, etc. To enable this place a file named Microsoft.MIEngine.Options.xml in the root of your solution or workspace. Here is a simple example<\/span><\/p>\n<pre>&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;SupplementalLaunchOptions&gt;\r\n    &lt;AttachOptions&gt;\r\n      &lt;AttachOptionsForConnection AdditionalSOLibSearchPath=\"\/home\/user\/solibs\"&gt;\r\n        &lt;ServerOptions MIDebuggerPath=\"C:\\Program Files (x86)\\Microsoft Visual Studio\\Preview\\Enterprise\\Common7\\IDE\\VC\\Linux\\bin\\gdb\\7.9\\x86_64-linux-gnu-gdb.exe\"\r\nExePath=\"C:\\temp\\ConsoleApplication17\\ConsoleApplication17\\bin\\x64\\Debug\\ConsoleApplication17.out\"\/&gt;\r\n        &lt;SetupCommands&gt;\r\n          &lt;Command IgnoreFailures=\"true\"&gt;-enable-pretty-printing&lt;\/Command&gt;\r\n        &lt;\/SetupCommands&gt;\r\n      &lt;\/AttachOptionsForConnection&gt;\r\n    &lt;\/AttachOptions&gt;\r\n&lt;\/SupplementalLaunchOptions&gt;\r\n<\/pre>\n<p><span style=\"font-family: Calibri\"><span style=\"color: #000000\">The AttachOptionsForConnection has most of the attributes you may need. The example above shows passing a location to search for additional .so libraries. The child element ServerOptions enables attaching to the remote process with gdbserver instead. To do that you need to specify a local gdb client (the one shipped in VS is shown above) and a local copy of the binary with symbols. The other child element SetupCommands allows you to pass commands directly to gdb. You can find all the options available in the <\/span><a href=\"https:\/\/github.com\/Microsoft\/MIEngine\/blob\/master\/src\/MICore\/LaunchOptions.xsd\">LaunchOptions.xsd schema<\/a><\/span><span style=\"color: #000000;font-family: Calibri\">, look at the root element for this file of SupplementalLaunchOptions.<\/span><\/p>\n<h2><span style=\"color: #2f5496;font-family: Calibri Light;font-size: large\">What\u2019s next\u00a0<\/span><\/h2>\n<p><span style=\"font-family: Calibri\"><span style=\"color: #000000\">Download the\u202f<\/span><a target=\"_blank\" href=\"https:\/\/www.visualstudio.com\/vs\/preview\/\" rel=\"noopener\">Visual Studio 2017 Preview<\/a><\/span><span style=\"color: #000000;font-family: Calibri\">, install the Linux C++ Workload and give it a try with your projects.<\/span><\/p>\n<p><span style=\"font-family: Calibri\"><span style=\"color: #000000\">The best way to reach us is via\u202f<\/span><a target=\"_blank\" href=\"https:\/\/github.com\/microsoft\/vslinux\/issues\" rel=\"noopener\">our GitHub hosted issue list<\/a><span style=\"color: #000000\">, directly via mail at\u202f<a target=\"_blank\">vcpplinux-support@microsoft.com<\/a>\u202for find me on Twitter\u202f<\/span><a target=\"_blank\" href=\"https:\/\/twitter.com\/robotdad\" rel=\"noopener\">@robotdad<\/a><\/span><span style=\"color: #000000;font-family: Calibri\">.\u00a0<\/span><span style=\"color: #000000;font-family: Calibri\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u70b9\u8fd9\u91cc\u770b\u4e2d\u6587\u7248 In Visual Studio 2017 15.7 Preview 1 we have made a number of improvements to our support to the Linux C++ workload based on your feedback. You can learn more about our Linux C++ workload in Visual Studio here. MSBuild Project System improvements We added some new properties to Linux projects on the C\/C++ [&hellip;]<\/p>\n","protected":false},"author":677,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[266,279],"tags":[],"class_list":["post-18435","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cmake","category-linux"],"acf":[],"blog_post_summary":"<p>\u70b9\u8fd9\u91cc\u770b\u4e2d\u6587\u7248 In Visual Studio 2017 15.7 Preview 1 we have made a number of improvements to our support to the Linux C++ workload based on your feedback. You can learn more about our Linux C++ workload in Visual Studio here. MSBuild Project System improvements We added some new properties to Linux projects on the C\/C++ [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/18435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/677"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=18435"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/18435\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=18435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=18435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=18435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}