Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>1C:ExecutorNew to Visual Studio Code? Get it now.

1C:Executor

Preview

1C-Soft LLC

|
4,747 installs
| (0) | Free
1C:Executor Support for VSCode
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ENGLISH

Поддержка встроенного языка 1С:Исполнителя (SBSL)

Обеспечивает поддержку встроенного языка 1C:Исполнителя.

Справочник по объектной модели языка 1С:Исполнителя.

Документация на 1С:Исполнитель.

Основные отличия языка Исполнителя от встроенного языка «1С:Предприятия».

Screenshot

Возможности

  • Контекстная подсказка по мере набора текста;
  • Автодополнение введенного текста;
  • Синтаксическая справка при наведении мыши на идентификатор;
  • Переход к определению метода и показ определения;
  • Поиск ссылок на метод и показ ссылок;
  • Переход к методу в файле и просмотр структуры методов;
  • Переименование рефакторингом;
  • Быстрые исправления;
  • Автоформатирование;
  • Семантическая и синтаксическая проверка файла по мере набора текста;
  • Отладка скриптов.

Системные требования

Java 11

Требуется 64-разрядная Java Platform, Standard Edition версии 11. Рекомендуем использовать один из следующих дистрибутивов OpenJDK 11:

  • Liberica JDK;
  • Zulu Community.

В процессе установки Java выполнит все необходимые настройки. Но, если этого не произошло, вы можете самостоятельно проконтролировать и при необходимости установить следующее:

  • Установите в переменную окружения JAVA_HOME каталог, в который установлена Java.
  • Если вы используете операционную систему Linux и в системе установлено более одной версии Java, то с помощью команды update-alternatives установите в качестве Java по умолчанию версию, соответствующую системным требованиям.
1С:Исполнитель
  1. Для запуска и отладки скриптов установите 1С:Исполнитель (скачать).
  2. В параметре расширения 1c.executor.path укажите путь к каталогу, в который установлен 1С:Исполнитель.

Установка

Вы можете установить расширение из магазина приложений Visual Studio Marketplace или из VSIX-файла.

Установка из Visual Studio Marketplace
  • Откройте панель Extensions (Ctrl+Shift+X);
  • В строке поиска введите Executor;
  • Нажмите Install;
Установка из из VSIX-файла: вариант 1
  • В Visual Studio Code нажмите F1 для активации командной палитры;
  • Наберите vsix;
  • Выполните команду Extensions: Install from VSIX... (Расширения: Установка из VSIX...);
  • Выберите VSIX-файл и нажмите Install (Установить).
Установка из из VSIX-файла: вариант 2
  • Откройте панель Extensions (Ctrl+Shift+X);
  • Откройте меню More Actions... (...) (Дополнительные действия (...)) и нажмите Install from VSIX... (Установка из VSIX...);
  • Выберите VSIX-файл и нажмите Install (Установить).
Интерфейс Visual Studio Code на русском языке

Если вы хотите использовать интерфейс Visual Studio Code на русском языке, установите языковой пакет для русского языка:

  • Откройте панель Extensions (Ctrl+Shift+X);
  • В строке поиска введите Russian Language Pack for Visual Studio Code;
  • Нажмите Install;

Быстрый старт

Просто откройте каталог, содержащий SBSL-файл

Программы на встроенном языке Исполнителя хранятся в SBSL-файлах. Если у вас еще нет SBSL-файла:

  1. Создайте каталог, в котором будут находиться ваши файлы;
  2. Внутри этого каталога создайте файл с произвольным именем и расширением sbsl;
  3. В Visual Studio Code нажмите Файл — Окрыть папку... (File - Open Folder...);

Если у вас есть SBSL-файл, в Visual Studio Code откройте каталог, содержащий этот файл.

Запуск и отладка файла с параметрами

Если метод Скрипт() содержит параметры, то для запуска и отладки такого файла нужно использовать конфигурацию запуска

Любой SBSL-файл должен содержать стандартный метод Скрипт(). Если в этом методе есть параметры, то для запуска и отладки файла нужно создать конфигурацию запуска.

Например, у вас есть такой метод:

метод Скрипт(парам1: Строка, парам2: Число)
  1. Нажмите Выполнить - Добавить конфигурацию... (Run - Add Configuration...). В вашем каталоге будет создан файл launch.json, описывающий конфигурацию запуска, и открыт для редактирования.
  2. Добавьте в этот файл значения параметров для метода Скрипт(), например "Привет!" и 200:
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.3.0",
    "configurations": [
        {
            "name": "Executor",
            "type": "sbsl",
            "request": "launch",
            "scriptFile": "${file}",
            "args": ["Привет!", 200]
        }
    ]
}
  1. Сохраните изменения файла launch.json
  2. Переключитесь на вкладку редактора, в которой отрыт SBSL-файл. Это необходимо потому, что в конфигурации запуска параметр "scriptFile": "${file}" говорит о том, что эта конфигурация запуска будет применена к текущему файлу, открытому в Visual Studio Code.
  3. Откройте панель Запуск (Ctrl+Shift+D) (Run (Ctrl+Shift+D)).
  4. В заголовке панели нажмите на зеленый треугольник Начать отладку (Start Debugging), чтобы запустить открытый файл с текущей конфигурацией запуска.
  5. По умолчанию Visual Studio Code создает конфигурацию для запуска SBSL-файла. Чтобы эту конфигурацию использовать для отладки, в ней нужно изменить значение параметра request на attach:
"request": "attach",

Параметры расширения

Это расширение поставляет следующие параметры:

  • 1c.executor.lsp.locale : язык, на котором будет показана синтаксическая подсказка;
  • 1c.executor.lsp.variant : язык контекстной подсказки (ключевые слова), русские или английские;
  • 1c.executor.path : путь к каталогу Исполнителя;
  • 1c.java.path : путь к исполняемому файлу java или java.exe; если этот параметр не задан, поиск Java будет выполняться в каталогах, указанных в системных переменных JAVA_HOME, а затем PATH.

Обратная связь

Вы можете задать нам вопросы в форуме для специалистов. Доступ к форуму ограничен, подробнее читайте здесь.

Возможные проблемы

Для регистрации ошибок и пожеланий используйте адрес testplatform@1c.ru. Для воспроизведения и анализа неправильной работы могут потребоваться LOG-файлы. Они находятся с следующих каталогах:

  • %TMP%/language-server/
  • %TMP%/debug-adapter/

Script Language Support for 1C:Executor

1C:Executor script (SBSL) Support supports the 1C:Executor script.

1C:Executor Objects Reference (ru).

Documentation for 1C:Executor (ru).

The main differences between the 1C:Executor language from the «1C:Enterprise» built-in language (ru).

Screenshot

Features

  • Content-assist for text input;
  • Text autocompletion;
  • Syntax help when mouse hovers over an language identifier;
  • Find and go to the method definition;
  • Find and look through the method references;
  • Go to the method in file or look through the method's structure;
  • Rename refactoring;
  • Quick fixes;
  • Autoformatting;
  • Semantic/Syntactic error reporting as you type;
  • Debug your scripts.

System requirements

Java 11

Java Platform, Standard Edition 11 x64 Use one of the following OpenJDK 11 distribution packages:

  • Liberica JDK;
  • Zulu Community.

You can use default Java settings during installation. However you can configure all the required settings manually:

  • specify the Java directory in the JAVA_HOME environment variable.
  • use the update-alternatives command to select the appropriate Java version as the default one on Linux
Executor
  1. Install 1C:Executor to run and debug scripts download).
  2. Specify the Executor directory in the 1c.executor.path extension parameter.

Installing

You can download the extension from Visual Studio Marketplace application or install it from the VSIX file.

Download from Visual Studio Marketplace
  • Open the Extensions (Ctrl+Shift+X) panel;
  • Type Executor in the search string;
  • Click Install;
Install from the VSIX file: option 1
  • Click F1 to activate the command panel in the Visual Studio Code;
  • Type vsix;
  • Run the Extensions: Install from VSIX... command;
  • Select the VSIX file and click Install.
Install from the VSIX file: option 2
  • Open the Extensions (Ctrl+Shift+X) panel;
  • Go to the More Actions... (...) menu and click Install from VSIX...;
  • Select the VSIX file and click Install.

Quick start

Go to the folder with SBSL file

The 1C:Executor scripts are stored in the SBSL files. If you do not have one:

  1. Create a folder for such files;
  2. Create a file with the sbsl extension in this folder;
  3. Go to File - Open Folder... in Visual Studio Code; If you already have SBSL file, open folder that contains this file in Visual Studio Code.

Run and debug file with parameters

If the Script() method is parameterized, then run configuration is required to run and debug such file.

An SBSL file must have the Script() standard method. If this method is parametrised then then the run configuration is required to run and debug such file. Example: method Script(param1: String, param2: Integer)

  1. Click Run - Add Configuration.... A launch.json file will be created in the default folder and opened. This file describes the run configuration
  2. Specify the values of the Script() method parameters here, for example, "Hi!" and 200:
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.3.0",
    "configurations": [
        {
            "name": "Executor",
            "type": "sbsl",
            "request": "launch",
            "scriptFile": "${file}",
            "args": ["Hello!", 200]
        }
    ]
}
  1. Save the launch.json file.
  2. Switch to the editor tab with the SBSL file. The "scriptFile": "${file}" in the run configuration means that this configuration will be applied to the currently opened file in the Visual Studio Code file.
  3. Open the Run (Ctrl+Shift+D) panel.
  4. Click the Start Debugging green triangle in the panel header to run the current file with the current run configuration.
  5. Visual Studio Code creates a run configuration for the SBSL file by default. Change the request parameter to attach use this configuration for debugging:
"request": "attach",

Extension parameters

The extension has the following parameters:

  • 1c.executor.lsp.locale : syntax help language;
  • 1c.executor.lsp.variant : content-assist language (keywords, English or Russian);
  • 1c.executor.path : 1C:Executor folder path;
  • 1c.java.path : java.exe or java executable file path; if this parameter is blank, then 1C:Executor will try to locate java in folders, specified in JAVA_HOME and PATH environment variables.

Feedback

Please, ask your questions on the partners forum. This forum has limited access. More details here.

Technical support

Please, send your issues and feedback on testplatform@1c.ru. We will likely need the LOG files to repeat and investigate the issues. You can find these files in the following folders:

  • %TMP%/language-server/
  • %TMP%/debug-adapter/
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft