Testing and debugging
How to check a module in the Multogram Modules Constructor: the test point, single and full tests, testing one action, resource test values, the variables and logs inspector, finding the causes of errors.
A module is checked right in the constructor: actions run for real, and executed cards are highlighted on the canvas.
A test does everything for real
Messages are sent, requests go out, files are written. Test on a test account, your own test chat and copies of files.
Before testing
In the Resources panel click Set Values and fill in the form's fields with test data — including test rows for accounts. See Values for tests.
The test point
The circle in the top-right corner of a card is the test point: the test starts from this action. Click the circle to move it. Without a test point the test starts from the first action of the open function.
Kinds of tests
| Button | Key | What it does |
|---|---|---|
| Single Test | F5 | Runs one action and moves the test point to the next one — step-by-step debugging |
| Full Test | F6 | Runs the scenario from the test point to the end of the function |
| Stop | Esc | Interrupts the test |
| Test this action | T over a card | Runs only this action |
A full test goes through called functions, loops and branches the same way the module does when it runs; a single test steps into conditions and loops one action at a time. The test runs in one thread. While it runs, the scenario can't be edited — stop the test to make a change.
Inspector
The Inspector opens with the button at the bottom left, next to the name of the open function.
| Tab | What it shows |
|---|---|
| Variables | All variables with their type and value. A value can be changed to check a branch with different data |
| Resources | Resources and their current values |
| Logs | The execution log: a filter by level (Info, Success, Warning, Error, Debug) and search |
If an action failed
- The card with the error is highlighted, and a message with the reason appears at the bottom.
- Open Logs in the inspector — the error text is there.
- Look at Variables: which values the action got as input.
- Fix the parameters, put the test point on this action and press F5.
Common causes: an empty variable (a typo in the [[name]]), a field path inside the brackets
([[account.phone]] instead of [[account]].phone), a resource without a test value after opening the
project, a Telegram action without an open session. More in Questions and problems.
Before building
- Run the module through a Full Test on at least one test account.
- Check the form with the Preview button: labels, required fields, visibility conditions.
- Ask the AI assistant to check the module for errors — its suggestions include a ready request.
Updated
Your own code
The Code Execution module in the Multogram Modules Constructor: built-in JavaScript, Python, Node.js, CMD, Bash and PowerShell. How variables and resources are inserted, how to return a result, packages.
Saving and building
The .agmp project and the .agm module in the Multogram Modules Constructor: saving, recent modules, backups, the Build module window — name, version, author, description, cover, translations, mode requirements — and releasing a new version.