Project Perfect let Swift run on server side-perfect in Visual Studio Code (iv)

Source: Internet
Author: User



Editor's note: This series of articles has been perfect official citation, this feeling is very good. Thanksgiving! THX all!





Visual Studio Code is a lightweight editor, but also feature rich, through plugins you can complete as cordova,reactnative,nodejs,php,asp.net Core development. The perfect file is edited by visual Studio code above, but the compilation process is finished in the terminal.



In fact, by adding Tasks.json to Visual Studio Code, you can finish compiling the perfect project.



Here's a question, why choose Visual Studio Code? This is a very complex triangular relationship,





Microsoft + Swift + Linux = True Love



(Of course you can say that brother is stubborn, but this is love.) And Microsoft stands for productivity! )



We continue to cite the example in the previous blog (this is recommended under the root account)



1. Tasks.json file is generated after ctrl+shit+p input configure Task Runner carriage return





2. Configuration Tasks.json because it is compiled into a dynamic library, we are able to configure Task.json in accordance with C + + compile mode




{
    "version": "0.1.0",
    "command": "make",
    "isShellCommand": true,
    "tasks": [
        {
            "taskName": "makefile",
            // Make this the default build command.
            "isBuildCommand": true,
            // Show the output window only if unrecognized errors occur.
            "showOutput": "always",
            // No args
            "args": ["all"],
            // Use the standard less compilation problem matcher.
            "problemMatcher": {
                "owner": "cpp",
                "fileLocation": ["relative", "${workspaceRoot}"],
                "pattern": {
                    "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "severity": 4,
                    "message": 5
                }
            }
        }
    ]
}
3. After saving the Tasks.json, you will be able to compile your perfect project directly.






Note: Of course, you can also go through the wrong line, but unfortunately it is not debug. (This issue has been mentioned with Perfect's team.) Hope to follow up soon).



Good. Next blog I will talk about the actual project. Welcome friends from all over the world to continue to pay attention, but also give me a lot of other feedback!














Project Perfect let Swift run on server side-perfect in Visual Studio Code (iv)


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.