{"name":"Visual Studio Code SQF Extensions","title":"Visual Studio Code SQF Extensions","type":"topic","url":"https://community.bistudio.com/wiki/Visual_Studio_Code_SQF_Extensions","revid":369513,"updated":"2024-09-11T21:48:15Z","aliases":["Arma 3: Visual Studio Code"],"markdown":"This page contains information about [Microsoft's Visual Studio Code editor](https://code.visualstudio.com/) and how it can be used for content creation in Arma.\n\n### Extensions\n\n> [!NOTE]\n> See the [Microsoft article](https://code.visualstudio.com/docs/editor/extension-marketplace).\n\nThe following is a list of recommended extensions. Note that it might be incomplete or out of date.\n[Search \"SQF\" on the marketplace](https://marketplace.visualstudio.com/search?term=SQF&target=VSCode&category=All%20categories&sortBy=Relevance) to find new or better extensions in that case.\n\n| Extension | Author | Remark |\n|---|---|---|\n| [SQF Language](https://marketplace.visualstudio.com/items?itemName=Armitxes.sqf) | Armitxes | Syntax highlighter. |\n| [SQF-VM Language Server](https://marketplace.visualstudio.com/items?itemName=SQF-VM.sqf-vm-language-server) | X39 et al. | Language server for sqf (checks code for errors). |\n| [SQF Debugger](https://marketplace.visualstudio.com/items?itemName=billw2011.sqf-debugger) | billw2011 | Debug sqf scripts (callstack, variables, breakpoints, ...) |\n| [SQF Wiki](https://marketplace.visualstudio.com/items?itemName=EelisLynne.sqf-wiki) | Eelis Lynne | Shortcut to go to the Biki page of the selected command/function. |\n\n### Tasks\n\nTo add tasks to your project follow these steps:\n\n1. Open the folder you are working in with VSCode\n1. Create a new directory at the root of it called `.vscode`\n1. Create a file called `tasks.json` inside of that directory\n1. Add the following content to it:\n\n   ```cpp\n   {\n       // See https://go.microsoft.com/fwlink/?LinkId=733558\n       // for the documentation about the tasks.json format\n       \"version\": \"2.0.0\",\n       \"tasks\": [\n           // -> Tasks go here <-\n       ]\n   }\n   ```\n\nThe following snippets will be listed under the `\"tasks\"` tag. Tasks are separated by a comma.\n\n#### Start Arma 3 (Mission Editing)\n\nThis task launches Arma 3 and opens a mission that is located inside of your working folder directly in Eden.\n\n```cpp\n{\n    \"label\": \"Start Arma 3 (Mission Editing)\",\n    \"type\": \"process\",\n    \"options\": {\n        \"cwd\": \"C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Arma 3\" // Change to your Arma 3 installation path\n    },\n    \"command\": \"arma3_x64\", // Also possible, if available: arma3profiling_x64, arma3diag_x64\n    \"args\": [\n        \"${workspaceFolder}\\\\mission.sqm\", // Loads directly into editor if you have a mission folder open in VSCode\n        \"-mod=!Workshop\\\\@CBA_A3;!Workshop\\\\@My Other Mod\", // Add mods separated by \";\", absolute paths work as well\n        \"-debug\",\n        \"-skipIntro\",\n        \"-filePatching\",\n        \"-noSplash\",\n        \"-showScriptErrors\"\n    ],\n    // Enable launching via shortcut \"Tasks: Run Test Task\"\n    \"group\": {\n        \"kind\": \"test\",\n        \"isDefault\": true\n    }\n}\n```\n\n#### Stop Arma 3\n\n*Immediately* closes Arma 3. Closing the game via the X button or <kbd>Alt</kbd> + <kbd>F4</kbd> would normally take some time. The name of the exe you are using can be found like this:\n\n1. Open task manager\n1. Select the \"Processes\" tab\n1. Find Arma 3\n1. Expand the entry\n1. Right click on the first sub-entry\n1. Select \"Go to details\"\n1. The \"Name\" column (by default the first one) contains the exe name\n\n```cpp\n{\n    \"label\": \"Stop Arma 3 Diag\",\n    \"type\": \"shell\",\n    \"command\": \"taskkill\",\n    \"args\": [\n        \"/F\",\n        \"/IM\",\n        \"arma3_x64.exe\" // Other values: arma3diag_x64.exe, arma3profiling_x64.exe\n    ],\n    \"problemMatcher\": []\n}\n```\n\n#### Track RPT\n\nChanges to the RPT files will be written to the Terminal window.\nYou might need to adjust the path ``$env:USERPROFILE\\\\AppData\\\\Local\\\\Arma` 3`` (`` ` `` is required before a space) to your needs if you are using the -profiles startup parameter.\n\n```json\n{\n    \"label\": \"RPT Watcher\",\n    \"type\": \"shell\",\n    \"command\": \"powershell\",\n    \"args\": [\n        \"-command\",\n        \"Get-ChildItem -Path $env:USERPROFILE\\\\AppData\\\\Local\\\\Arma` 3 -Filter *.rpt | Sort-Object LastAccessTime -Descending | Select-Object -First 1 | Get-Content -Tail 1 -Wait -Encoding utf8\"\n    ],\n    \"problemMatcher\": []\n}\n```","sections":[{"heading":null,"level":1,"markdown":"This page contains information about [Microsoft's Visual Studio Code editor](https://code.visualstudio.com/) and how it can be used for content creation in Arma."},{"heading":"Extensions","level":3,"markdown":"> [!NOTE]\n> See the [Microsoft article](https://code.visualstudio.com/docs/editor/extension-marketplace).\n\nThe following is a list of recommended extensions. Note that it might be incomplete or out of date.\n[Search \"SQF\" on the marketplace](https://marketplace.visualstudio.com/search?term=SQF&target=VSCode&category=All%20categories&sortBy=Relevance) to find new or better extensions in that case.\n\n| Extension | Author | Remark |\n|---|---|---|\n| [SQF Language](https://marketplace.visualstudio.com/items?itemName=Armitxes.sqf) | Armitxes | Syntax highlighter. |\n| [SQF-VM Language Server](https://marketplace.visualstudio.com/items?itemName=SQF-VM.sqf-vm-language-server) | X39 et al. | Language server for sqf (checks code for errors). |\n| [SQF Debugger](https://marketplace.visualstudio.com/items?itemName=billw2011.sqf-debugger) | billw2011 | Debug sqf scripts (callstack, variables, breakpoints, ...) |\n| [SQF Wiki](https://marketplace.visualstudio.com/items?itemName=EelisLynne.sqf-wiki) | Eelis Lynne | Shortcut to go to the Biki page of the selected command/function. |"},{"heading":"Tasks","level":3,"markdown":"To add tasks to your project follow these steps:\n\n1. Open the folder you are working in with VSCode\n1. Create a new directory at the root of it called `.vscode`\n1. Create a file called `tasks.json` inside of that directory\n1. Add the following content to it:\n\n   ```cpp\n   {\n       // See https://go.microsoft.com/fwlink/?LinkId=733558\n       // for the documentation about the tasks.json format\n       \"version\": \"2.0.0\",\n       \"tasks\": [\n           // -> Tasks go here <-\n       ]\n   }\n   ```\n\nThe following snippets will be listed under the `\"tasks\"` tag. Tasks are separated by a comma."},{"heading":"Start Arma 3 (Mission Editing)","level":4,"markdown":"This task launches Arma 3 and opens a mission that is located inside of your working folder directly in Eden.\n\n```cpp\n{\n    \"label\": \"Start Arma 3 (Mission Editing)\",\n    \"type\": \"process\",\n    \"options\": {\n        \"cwd\": \"C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Arma 3\" // Change to your Arma 3 installation path\n    },\n    \"command\": \"arma3_x64\", // Also possible, if available: arma3profiling_x64, arma3diag_x64\n    \"args\": [\n        \"${workspaceFolder}\\\\mission.sqm\", // Loads directly into editor if you have a mission folder open in VSCode\n        \"-mod=!Workshop\\\\@CBA_A3;!Workshop\\\\@My Other Mod\", // Add mods separated by \";\", absolute paths work as well\n        \"-debug\",\n        \"-skipIntro\",\n        \"-filePatching\",\n        \"-noSplash\",\n        \"-showScriptErrors\"\n    ],\n    // Enable launching via shortcut \"Tasks: Run Test Task\"\n    \"group\": {\n        \"kind\": \"test\",\n        \"isDefault\": true\n    }\n}\n```"},{"heading":"Stop Arma 3","level":4,"markdown":"*Immediately* closes Arma 3. Closing the game via the X button or <kbd>Alt</kbd> + <kbd>F4</kbd> would normally take some time. The name of the exe you are using can be found like this:\n\n1. Open task manager\n1. Select the \"Processes\" tab\n1. Find Arma 3\n1. Expand the entry\n1. Right click on the first sub-entry\n1. Select \"Go to details\"\n1. The \"Name\" column (by default the first one) contains the exe name\n\n```cpp\n{\n    \"label\": \"Stop Arma 3 Diag\",\n    \"type\": \"shell\",\n    \"command\": \"taskkill\",\n    \"args\": [\n        \"/F\",\n        \"/IM\",\n        \"arma3_x64.exe\" // Other values: arma3diag_x64.exe, arma3profiling_x64.exe\n    ],\n    \"problemMatcher\": []\n}\n```"},{"heading":"Track RPT","level":4,"markdown":"Changes to the RPT files will be written to the Terminal window.\nYou might need to adjust the path ``$env:USERPROFILE\\\\AppData\\\\Local\\\\Arma` 3`` (`` ` `` is required before a space) to your needs if you are using the -profiles startup parameter.\n\n```json\n{\n    \"label\": \"RPT Watcher\",\n    \"type\": \"shell\",\n    \"command\": \"powershell\",\n    \"args\": [\n        \"-command\",\n        \"Get-ChildItem -Path $env:USERPROFILE\\\\AppData\\\\Local\\\\Arma` 3 -Filter *.rpt | Sort-Object LastAccessTime -Descending | Select-Object -First 1 | Get-Content -Tail 1 -Wait -Encoding utf8\"\n    ],\n    \"problemMatcher\": []\n}\n```"}],"categories":["Arma 3: Editing","Arma 3: Tutorials","Community Tools"],"groups":["Scripting"]}