Skip to content
Educora
Beginner15 min2 / 14

The Configurator: your first infobase and debugging

Create an empty infobase, explore the metadata tree, add your first catalog, update the database configuration with F7 and debug code with F5.

Check yourself
In this lesson you will learn
  • Create an empty infobase and open it in the Configurator
  • Explain the difference between the main configuration and the database configuration
  • Debug code with breakpoints, stepping and expression evaluation

The best way to learn programming is to build something right away. In this lesson you will create an empty base for a small shop, add a “Products” catalog to it, check it in user mode and debug your first code step by step. All you need is the 1C:Enterprise 8.3 platform (the training version is fine).

Creating an empty infobase

  1. 1
    Open the launcher

    Start 1C:Enterprise. The window that opens shows the list of infobases. Click Добавить… (Add).

  2. 2
    Choose a new infobase

    Choose Создание новой информационной базы (create a new infobase), then Создание информационной базы без конфигурации… (without a configuration) — this gives you an empty configuration.

  3. 3
    Name and location

    Name the base (for example “Educora Shop”) and choose На данном компьютере или на компьютере в локальной сети (on this computer or on the local network) — this is file mode. Then pick an empty folder.

  4. 4
    Finish and open the Configurator

    Keep the remaining settings and click Готово (Finish). Select the new base in the list and click Конфигуратор (Designer).

The metadata tree and the two configurations

The menu Конфигурация › Открыть конфигурацию (Configuration › Open configuration) opens the metadata tree. The root is the configuration name, with branches below: Общие (common objects: subsystems, common modules, roles…), Константы, Справочники (catalogs), Документы, Перечисления (enumerations), Отчеты, Обработки (data processors), registers and more. Every object has a property palette (Alt+Enter) and an editor window.

Definition
Main configuration and database configuration

What you edit in the Configurator is the main configuration. Users work with the database configuration. Your changes reach the database only after Обновить конфигурацию базы данных (Update database configuration, F7).

First catalog: “Products”

  1. 1
    Create a subsystem

    Right-click Общие › Подсистемы → Добавить (Add). Name it Склад (Warehouse). A subsystem appears as a section in the user interface.

  2. 2
    Add a catalog

    Справочники → Добавить. Name: Товары (Products). On the Подсистемы tab tick the Склад subsystem.

  3. 3
    Add an attribute

    On the Данные (Data) tab add Цена (Price) to Реквизиты (attributes): type Число (Number), length 15, precision 2.

  4. 4
    Update the base and run it

    Press F7: confirm the changes in the Реорганизация информации (data restructuring) window with Принять (Accept). Then press F5 — 1C:Enterprise mode opens and the Products catalog appears in the Склад section.

First code and debugging

Right-click the configuration root and choose Открыть модуль управляемого приложения (Open managed application module). Its event procedure ПриНачалеРаботыСистемы (OnStart) runs on the client as soon as the application opens. Type the code below and check the syntax with Ctrl+F7.

1C
Процедура ПриНачалеРаботыСистемы()
    Сумма = 0;
    Для Н = 1 По 5 Цикл
        Сумма = Сумма + Н;  // поставь здесь точку останова (F9)
    КонецЦикла;
    Сообщить("Сумма: " + Сумма);
КонецПроцедуры
Expected output
Сумма: 15
Сообщить() (Message) shows text in the messages window. 1 + 2 + 3 + 4 + 5 = 15.

Now put a breakpoint on the line Сумма = Сумма + Н; with F9 and press F5. Execution stops on that line. Step through with F10, look at the value of Сумма or Н with Shift+F9, and open the watch panel (табло) with Ctrl+Alt+W — there variables refresh at every step.

Update the database configurationF7
Start / continue debuggingF5
Run 1C:Enterprise without debuggingCtrl+F5
Stop debuggingShift+F5
Set / remove a breakpointF9
Step over: next line without entering proceduresF10
Step into the called procedureF11
Step out of the current procedureShift+F11
Evaluate an expressionShift+F9
Check the module syntaxCtrl+F7
Go to the declaration of a procedure or variable (back — Ctrl+-)F12
Context hint (autocompletion)Ctrl+Space

Protect your work: backups

FileWhat it containsWhere it is created
.dtthe whole base: configuration + dataАдминистрирование › Выгрузить информационную базу
.cfthe configuration onlyКонфигурация › Сохранить конфигурацию в файл
.cfua configuration update filereleased by the vendor
.epf / .erfexternal data processor / external reportФайл › Новый…
.cfea configuration extensionin the extension editor

Key points

  • An empty base is created with the option Создание информационной базы без конфигурации….
  • In the Configurator you edit the main configuration; users see the changes after F7.
  • Subsystems are interface sections; include an object in a subsystem so it appears there.
  • Debugging: F9 breakpoint, F5 start, F10/F11 step, Shift+F9 evaluate.
  • Backups: the whole base — .dt, the configuration only — .cf.

Check yourself

10 questions. Every correct answer earns XP.

1 / 10
You changed the configuration, but users do not see the change. What was forgotten?