of0.11.0が出ました。
公式でVSCodeをサポートするようになったが、やり方が書いてなかったのでそれをやっていく。
- projectGeneratorの設定を選ぶ

-
Advanced options
にチェックをつける

- するとTemplateが選べるようになるので
Visual Studio Code
選択

- するとVSCodeのワークスペースが作られたプロジェクトが作られるので、ワークスペースをダブルクリック

ビルドとアプリの実行を同時に行う
- ビルドとアプリの実行を毎回別で行うのは面倒臭いので、アプリの実行をタスクにして、アプリの実行の前にビルドを走らせるようにする
.vscode/tasks.json
に以下を追記。
-
"dependsOn"
で先に実行させたいタスクを選択
.vscode/tasks.json
{
"type": "shell",
"label": "Run DEBUG",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"command": "make RunDebug",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"${workspaceFolder}"
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"dependsOn": [
"Build DEBUG"
]
}
これで、憎きXcodeから離脱して快適なoFライフ!!