docs/en-us/develop/vsc-ext-tutorial.md
The extension provides a series of convenient development capabilities for MaaAssistantArknights/MaaFramework, including but not limited to the following features:
template preview, next jump, task reference, etc.For details, please visit Extension Store or Repository.
Searching Maa and installing it from VS Code extensions list is recommended.
::: tip
When used for the first time, the extension will automatically download the preset version of resources.
Search command Maa: select fetch registry to switch the download source (npm / cnpm).
:::
A dedicated control panel is added to the left, with icon
The major features of the extension are based on the interface.json configuration. Select the activated interface.json on the top of the control panel.
The extension has a Maa compatiable mode. If src/MaaCore folder exists inside the opened workspace, the mode will be enabled automatically.
Select expected resource via the Resource select inside the control panel. The extension will index and diagnose resource via corresponding paths.
If you find that the editing json isn't hinted by the extension, please check if the activated resource contains it.
The term
definitions of task / task defsrefers to key props of task objects.The term
references of task / task refsrefers to values containing task name (e.g. innext) in other task objects.
The extension supports Jump to task defs, Jump to task refs and View task defs.
When enabling the Maa compatible mode, the extension will be able to parse template task, supporting querying task defs and task refs in conjunction with base tasks. Images that have the same name as the task will be shown when hovering the task defs.
Use Ctrl+T to quickly query and jump to a task definition.
The extension supports open images.
When enabling the Maa compatible mode, the extension will be able to recursively search for the image.
The extension supports autocompletion according to all known tasks.
When enabling the Maa compatible mode, typing @ will trigger completion.
The extension supports autocompletion according to the path of all known images.
When enabling the Maa compatible mode, the extension will be able to recursively search for the image.
The extension supports scheduled scanning and diagnosing all tasks.
The extension supports resource with multiple paths. The extension will perform logical overlapping according to specified order, thus content loaded later can reference content loaded earlier.
Evaluating the expanded task object and the sources of each properties, and the result of the task list expression via the control panel.
Scanning and selecting controllers, selecting resource, adding and manipulating tasks, and launching tasks can be done via the control panel.
Searching and launching Maa: open crop tool inside VS Code command panel can open Screenshots / Crop panel.
Use
Ctrl+Shift+P(Command+Shift+Pon macOS) to open command panel
Screencap button to obtain screenshotsUpload button to manually upload images.Ctrl key and select cropping areaDownload button to save the cropping result to the folder of the topest layer of the activated resourceCopy button to copy the ROI as an array to the clipboard.Tool button to open the recognition tool panel, where you can directly test recognition on the current image.::: warning
If OCR recognition returns an empty result, please check whether the OCR model is configured correctly.
For MAA, the extension will maintain the models used automatically; you only need to select the proper resource.
:::
Search and execute Maa: open maa log in the VS Code command panel to view the maa.log generated during debugging.
Search and execute Maa: open extension log in the VS Code command panel to view the mse.log generated during debugging.
Click to reveal control panel
Click to switch MaaFramework version used by the extension. The selectable versions are limited to those supported by the current extension. If the version you need is not in the list, please consider changing the extension version.