티스토리 뷰

728x90
반응형

파이썬 설치가 안돼있다면 파이썬을 설치하고 VSCode의 Extension에서 install 해주자.

 

1. Ctrl+Shift+P눌러 Tasks:Configure Task 누르기

2. Others 클릭 => tasks.json 파일 열림

3. 다음의 내용으로 변경하고 저장하기

{

    "version": "2.0.0",

    "tasks": [

        {

            "label": "python execute",

            "type": "shell",

            "command": "python",

            "options": {

                "cwd": "${fileDirname}"

            },

            "args": [

                "${file}"

            ],

            "group":{

                "kind": "build",

                "isDefault": true

            },

            "presentation": {

                "echo": true,

                "reveal": "always",

                "focus": false,

                "panel": "shared",

                "showReuseMessage": true,

                "clear": true

            }

        },

 

        {

            "label": "c execute",

            "type": "shell",

            "command": "./${fileBasenameNoExtension}",

            "group":{

                "kind": "test",

                "isDefault": true

            },

            "presentation": {

                "echo": true,

                "reveal": "always",

                "focus": false,

                "panel": "shared",

                "showReuseMessage": true,

                "clear": true

            }

        }

    ]

}

4. 파이썬 파일에서 Ctrl + Shift + B로 실행되는지 확인하기

 

끄읕 ~

 

반응형
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함