Skip to the content.

Development workflow: scripts, Eclipse, compiling, delivery

Where L4G scripts live in a folder, how they are registered (GESADC), edited and debugged with Safe X3 Studio for Eclipse, what Sage does and does not document about compiling, and the write → compile → fix → test → patch loop to follow when Claude writes code it cannot run. Read it when the user asks how to compile, where errors show up or how to set up Eclipse, and before handing over new code. Patches are in personalisation-activity.md, tests in unit-testing-axunit.md, logs and error variables in debugging-traces.md.

Contents

Where scripts live

Script dictionary (GESADC)

The V12 page is titled “Processings” (V11 menu: Development > Script dictionary > Scripts > Script dictionary). One record per script:

Field Use
Script (CODTRT) “Identifier on 12 characters”
Description Title shown in screens and reports
Activity code (CODACT) X/Y/Z marks the script as specific; when the code is disabled the element “will not be useable”. Put the delivery’s code here so it travels with the patch
Source processing delivered (SRC) “Flag used during the industrialization of the product”

Safe X3 Studio (Eclipse)

“The Studio component is an Eclipse plug-in” (online help). Sage’s plug-in site calls Safe X3 Studio “the Sage development environment” for “editing and debugging Sage X3 scripts”.

Debugging in Eclipse

The online-help procedure (written for Eclipse Indigo):

  1. Open the script in Eclipse, then Window > Open Perspective > Debug.
  2. Click Attach to process and debug, select your process, click Attach.
  3. Put the cursor on the line where debugging starts, then Run > Run to line.
  4. Run the transaction in the X3 client: it stops on that line. Then debug “using the standard Eclipse functionality”.

Compiling: what is documented

The public online help has no page that explains how to compile a script, nor how compilation errors are displayed. Never invent a menu, button, shortcut or function for it: tell the user to compile with the tool their folder uses (Safe X3 Studio, or the in-product script editor) and to paste the exact messages. What can be stated:

Reading a runtime error

Runtime errors name the compiled script (community-reported, V12 p37 thread):

@X3.TRT/SUBSOHA1$adx (1367) Error 6 : Variable Non-existent SPJT

VS Code and other editors

Feedback loop when Claude writes code

This is the skill’s recommended workflow, not a Sage procedure. Claude cannot compile or run L4G: never say that code compiles, runs or passes its tests unless the user reports it. Say it is checked against the documentation, not compiled. Copy the checklist into the answer and tick what the user confirms:

- [ ] 1. Write in house style, X/Y/Z names; record in GESADC with the delivery's activity code
- [ ] 2. Self-check: SKILL.md "Self-check before you answer", code-review-checklist.md tiers 1-3,
         nothing from the "never write them" list of SKILL.md
- [ ] 3. User compiles in a development folder (Safe X3 Studio or the script editor) and pastes
         the exact messages: script, line, error number, text
- [ ] 4. Fix only what the messages point to; user recompiles until clean
- [ ] 5. User runs the AXUNIT suite in the Eclipse console: =>func QLF<area>_<case>.TESTSUITE
- [ ] 6. Functional test in a test folder with representative data; read the logs
- [ ] 7. Remove Dbgaff / dbgmode; APATCH with the activity code; PATCH in simulation, then
         integration on a copy of the target folder before production

Gotchas

See also: personalisation-activity.md, unit-testing-axunit.md, debugging-traces.md, code-review-checklist.md, conventions-and-naming.md, data-dictionary.md, function-codes.md, security-permissions.md.

Sources