Escolar Documentos
Profissional Documentos
Cultura Documentos
CIÊNCIAS DA COMPUTAÇÃO
Ambiente de
Trabalho
Compiladores
• Mas é configurável:
• Pode trabalhar com ferramentas externas:
• Incluindo g++, gdb, make e cmake
• Possui suporte a extensões (plugins):
• Possui loja dentro do próprio editor
Extensões
• C/C++
Microsoft
• CMake
twxs
• Abrindo Pastas
• Menu Arquivo - Abrir Pasta (Ctrl+K Ctrl+O)
• Permite abrir um projeto criado anteriormente
• Possibilita criação de tarefas:
• Compilação
• Depuração
tasks.json
{
"version": "2.0.0",
"tasks": [
Realiza a
{ compilação
"label": "build", direta, sem usar
"type": "shell", um sistema de
"command": "g++ parser.cpp postfix.cpp -g -std=c++17 -o postfix"
} compilação
]
}
»
Compilação
"problemMatcher": "$gcc",
"group": {
"kind": "build",
"isDefault": true
},
»
Compilação
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true,
"clear": true
}
»
Depuração
launch.json
Adicione um breakpoint
... ou mude a opção
"program": "${workspaceFolder}/postfix", stopAtEntry para entrar
"args": [],
"stopAtEntry": false, em modo de depuração
... passo a passo.
"preLaunchTask": "build"
»
Usando Make
"command": "make"
»
Usando CMake
tasks.json
Argumentos podem
"tasks": [
{
ser passados para os
"label": "cmake", comandos
"type": "shell",
"command": "cmake",
"args": ["../"],
"group": "build",
"options": { É necessário definir a
"cwd": "${workspaceFolder}/Debug", pasta de trabalho, local
},
"problemMatcher": [ ],
onde será executado o
}, comando cmake
]
»
CMake Debug e Release
{ {
"label": "cmake debug", "label": "cmake release",
"type": "shell", "type": "shell",
"command": "cmake", "command": "cmake",
"args": [ "args": [
"-DCMAKE_BUILD_TYPE=Debug", "-DCMAKE_BUILD_TYPE=Release",
"../" "../"
], ],
"group": "build", "group": "build",
"options": { "options": {
"cwd": "${workspaceFolder}/Debug", "cwd": "${workspaceFolder}/Release",
}, },
"problemMatcher": [ ], "problemMatcher": [ ],
}, },
»
Make Debug e Release
{
"label": "make debug", {
"type": "shell", "label": "make release",
"command": "make", "type": "shell",
"args": [], "command": "make",
"group": { "args": [],
"kind": "build", "group": "build",
"isDefault": true "options": {
}, "cwd": "${workspaceFolder}/Release",
"options": { },
"cwd": "${workspaceFolder}/Debug", "problemMatcher": ["$gcc"],
}, },
"problemMatcher": ["$gcc"],
},
»
Tarefas
Tarefas
configuradas
Rodando o Programa