1c-devtools-cursor
Original:🇺🇸 English
Translated
Cursor IDE extension providing development tools for 1C:Enterprise 8 ecosystem with command palette, task tree, and debugging support
10installs
Sourcearadotso/devtools-skills
Added on
NPX Install
npx skill4agent add aradotso/devtools-skills 1c-devtools-cursorTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →1C Dev Tools for Cursor
Skill by ara.so — Devtools Skills collection.
Extension for Cursor IDE that provides comprehensive development tools for the 1C:Enterprise 8 ecosystem. Offers command palette integration, task tree navigation, configuration management, extension handling, and BSL debugging capabilities.
What It Does
1C Dev Tools integrates 1C:Enterprise development workflow into Cursor IDE:
- Information Base Management: Create, update, export/import databases
- Configuration Operations: Load/unload configurations from sources (src/cf), build .cf files
- Extension Management: Work with multiple extensions (src/cfe), compile .cfe files
- External Files: Build and disassemble external reports/processors
- Dependency Management: Initialize and manage packagedef dependencies
- Launch Tools: Start Enterprise or Configurator from IDE
- BSL Debugging: Attach debugger with variable inspection, watch expressions, and call stack navigation
All commands accessible through:
- 1C Dev Tools panel
- Command palette (Ctrl+Shift+P)
- Task tree in bottom panel
Installation
Prerequisites
- Node.js 18.x or higher
- OneScript (oscript) - Script execution engine: https://oscript.io/
- Windows environment variable: Create pointing to
oscriptC:\Program Files\OneScript\bin\oscript.exe
Install Extension
- Open Cursor IDE
- Press → "Extensions: Install from VSIX"
Ctrl+Shift+P - Select the file
.vsix - Restart Cursor
Project Setup
Extension auto-activates when file exists in project root.
packagedefProject structure:
project-root/
├── packagedef # Project manifest (required for activation)
├── env.json # Connection parameters
├── launch.json # Debug configurations
├── tasks.json # Custom tasks
├── oscript_modules/ # OneScript modules override
├── src/
│ ├── cf/ # Configuration sources
│ └── cfe/ # Extension sources (subdirectories per extension)
└── build/
├── ib/ # Information base
└── commit/
└── Commit.txt # Changed files list for incremental updatesConfiguration
env.json - Connection Parameters
Create in project root:
env.jsonjson
{
"$schema": "https://raw.githubusercontent.com/vanessa-opensource/vanessa-runner/develop/vanessa-runner-schema.json",
"default": {
"--ibconnection": "/F./build/ib",
"--infoBase": "MyInfoBase",
"--db-user": "Admin",
"--db-pwd": "",
"--root": ".",
"--workspace": ".",
"--v8version": "8.3.27",
"--v8-platform-root": "C:/Program Files/1cv8",
"--debug-server": "localhost",
"--debug-port-range": "1560:1591",
"--locale": "ru",
"--language": "ru",
"--additional": "/DisplayAllFunctions /Lru /iTaxi /TESTMANAGER",
"--ordinaryapp": "-1"
}
}Key parameters:
- : File base path (
--ibconnection) or server (/F./build/ib)/S<server>\<base> - : Platform version (e.g.,
--v8version)8.3.27 - : Installation path
--v8-platform-root - : Debug server hostname (use computer name for local)
--debug-server - : RDBG port range
--debug-port-range
launch.json - Debug Configurations
Create :
.vscode/launch.jsonjson
{
"configurations": [
{
"type": "onec",
"request": "launch",
"name": "1C: Launch with background jobs",
"debugServerHost": "localhost",
"debugServerPort": 1560,
"infoBaseAlias": "DefAlias",
"autoAttachTypes": [
"Client",
"Server",
"Job",
"JobFileMode"
]
},
{
"type": "onec",
"request": "launch",
"name": "1C: Launch without background jobs",
"debugServerHost": "localhost",
"debugServerPort": 1560,
"infoBaseAlias": "DefAlias",
"autoAttachTypes": [
"Client",
"Server"
]
},
{
"type": "onec",
"request": "attach",
"name": "1C: Attach",
"debugServerHost": "localhost",
"debugServerPort": 1560,
"infoBaseAlias": "DefAlias",
"autoAttachTypes": [
"Client",
"Server"
]
}
]
}autoAttachTypes options: , , , , , , , , , , , , , , ,
ClientManagedClientWebClientComConnectorServerServerEmulationWebServiceHttpServiceODataJobJobFileModeMobileClientMobileServerMobileJobFileModeMobileManagedClientMobileManagedServerDebug Server Settings
Extension automatically manages debug server:
dbgs.exe- Local: Auto-starts server on activation
- Remote: Attempts connection
- Protocol: HTTP only (configure in Configurator)
Fine-tune debug timings via settings ():
1c-dev-tools.debug.timingsjson
{
"1c-dev-tools.debug.timings": {
"varFetchDelayMs": 50,
"calcWaitingTimeMs": 100,
"pingIntervalMs": 50,
"pingStoppedIntervalMs": 500,
"stepInOutDelayMs": 40,
"immediatePingDelaysMs": [25, 50, 100],
"evalExprRetryDelaysMs": [50, 100],
"variablesRequestRetryDelaysMs": [50, 100, 150],
"pingDbgtgtIntervalMs": 5000
}
}Key Commands
Access via command palette ( → "1C: ..." or "1С: ...") or 1C Dev Tools panel.
Ctrl+Shift+PInformation Base
1C: Create empty infobase
1C: Post-update processing
1C: Prohibit external resources
1C: Export to dt / Import from dtConfiguration Management
Load/Export sources:
1C: Load from src/cf # Load entire configuration from sources
1C: Update from src/cf # Incremental update (uses build/commit/Commit.txt)
1C: Export to src/cf # Full export to sources
1C: Export update to src/cf # Export only changesBinary files:
1C: Load from 1Cv8.cf # Import .cf file
1C: Export to 1Cv8.cf # Export configuration
1C: Export distribution 1Cv8dist.cf
1C: Build 1Cv8.cf from src/cf
1C: Disassemble 1Cv8.cf to src/cfExtension Management
Source operations:
1C: Load from src/cfe # Load all extensions from sources
1C: Export to src/cfe # Export all extensions to sources
1C: Export update to src/cfe # Export only changed extensions
1C: Update from src/cfe # Incremental update (uses Commit.txt)Binary operations:
1C: Load from *.cfe
1C: Export to *.cfe
1C: Build *.cfe from src/cfe
1C: Disassemble *.cfe to src/cfeExternal Files
1C: Build external report/processor # Compile external file
1C: Disassemble external report/processor
1C: Clear cacheDependencies
1C: Initialize packagedef # Create dependency manifest
1C: Install dependencies
1C: Remove dependenciesLaunch
1C: Launch Enterprise # Start client application
1C: Launch Configurator # Open ConfiguratorDebugging BSL Modules
Starting Debug Session
- Set breakpoints in files (click left margin)
.bsl - Press or Run → Start Debugging
F5 - Select configuration: "1C: Launch with background jobs" or "1C: Attach"
- Extension connects to on specified port
dbgs.exe - Launch 1C:Enterprise (manually or via command)
Variable Inspection
Watch panel (add expressions):
- Right-click variable in editor → "Show value in separate window"
- Click "Calculate value" button in Watch panel header
- Enter expression:
Query.TemporaryTablesManager.Tables[0]
Supported types:
- Структура (Structure): Expands with fields and values
- Соответствие (Map): Expands with Key/Value pairs
- ТаблицаЗначений (ValueTable): Shows columns, indexes, rows ,
[0], etc.[1] - МенеджерВременныхТаблиц (TempTablesManager): Shows temporary tables tree
Calculate Expression
Right-click in editor → "Calculate value":
bsl
// In stopped context, evaluate:
Query.TemporaryTablesManager.Tables[0].GetColumns()
Result.Find("MyValue", "FieldName")
Collection.Count() > 10Result displays in table: Property | Value | Type
Call Stack Navigation
Note: Local variables don't display in default view. To inspect:
- Select stack frame (procedure/function) in Call Stack panel
- Add variable to Watch panel
- Variable evaluates in selected frame context
Step Commands
F10 - Step Over
F11 - Step Into
Shift+F11 - Step Out
F5 - Continue
Shift+F5 - StopExtension auto-refreshes stack and variables with optimized ping intervals.
Common Patterns
Initial Project Setup
bash
# 1. Create project structure
mkdir my-1c-project
cd my-1c-project
mkdir -p src/cf src/cfe build/ib build/commit
# 2. Initialize packagedef
# Open in Cursor, press Ctrl+Shift+P → "1C: Initialize packagedef"
# 3. Create env.json (see Configuration section)
# 4. Create empty infobase
# Ctrl+Shift+P → "1C: Create empty infobase"Load Configuration from External Source
bash
# 1. Place 1Cv8.cf in project root
# 2. Ctrl+Shift+P → "1C: Load from 1Cv8.cf"
# 3. Export to sources: "1C: Export to src/cf"Incremental Development Workflow
- Work in Configurator, make changes
- Export changes:
1C: Export update to src/cf - Commit to version control
- Teammates update: (reads
1C: Update from src/cf)build/commit/Commit.txt
build/commit/Commit.txt format (one file per line):
src/cf/Documents/Документ1/Ext/ManagerModule.bsl
src/cf/Catalogs/Справочник1.xml
src/cfe/Extension1/Documents/Документ1/Ext/ObjectModule.bslWorking with Multiple Extensions
bash
# Extensions stored in subdirectories:
src/cfe/
├── Extension1/
│ ├── Configuration.xml
│ └── Documents/...
└── Extension2/
├── Configuration.xml
└── Catalogs/...
# Commands operate on all extensions:
1C: Load from src/cfe # Loads Extension1 + Extension2
1C: Export update to src/cfe # Exports changes from allBuild External Processor
bsl
// src/ExternalReports/MyReport/ObjectModule.bsl
Процедура ПриКомпоновкеРезультата(ДокументРезультат, ДанныеРасшифровки, СтандартнаяОбработка)
// Report logic
КонецПроцедуры- Place sources in
src/ExternalReports/MyReport/ - →
Ctrl+Shift+P1C: Build external report/processor - Select
MyReport - Output: in project root
MyReport.erf
Debug BSL Code Example
bsl
// CommonModule.bsl
Функция ВыполнитьЗапрос(ТекстЗапроса)
Запрос = Новый Запрос;
Запрос.Текст = ТекстЗапроса;
// Set breakpoint here ⬅
Результат = Запрос.Выполнить();
ТЗ = Результат.Выгрузить();
Возврат ТЗ;
КонецФункцииWhen stopped at breakpoint:
- Add to Watch
Запрос - Expand
Запрос.МенеджерВременныхТаблиц.Таблицы - Right-click → "Show value in separate window" (after step-over)
ТЗ
Troubleshooting
Extension Not Activating
Symptom: 1C Dev Tools panel not visible
Solution:
Solution:
- Ensure exists in project root
packagedef - Restart Cursor
- Check Output panel → "1C Dev Tools" for errors
oscript Command Not Found
Symptom: Commands fail with "oscript not recognized"
Solution:
Solution:
- Install OneScript: https://oscript.io/
- Create Windows environment variable:
oscript = C:\Program Files\OneScript\bin\oscript.exe - Restart Cursor after setting variable
Debug Server Connection Failed
Symptom: Cannot connect to debug server
Solution:
Solution:
- Verify running (Task Manager)
dbgs.exe - Check →
launch.jsonmatches actual hostnamedebugServerHost - Ensure port (or configured) not blocked by firewall
1560 - In Configurator: Debug → Change protocol to HTTP
- Restart debug server manually:
dbgs.exe --addr localhost --port 1560
Variables Not Showing in Watch
Symptom: Watch panel empty or shows "unavailable"
Solution:
Solution:
- Select correct Call Stack frame (click procedure name)
- Manually add variable name to Watch (don't rely on auto-detection)
- Increase in settings if timing issue
varFetchDelayMs - Use "Calculate value" button instead for complex expressions
Load from src/cf Fails
Symptom: "Configuration load error"
Solution:
Solution:
- Verify exists
src/cf/Configuration.xml - Check →
env.jsonpath correct--ibconnection - Ensure infobase not locked (close Configurator/Enterprise)
- Try "1C: Create empty infobase" first
Update from src/cfe Skips Files
Symptom: Changes not applied
Solution:
Solution:
- Check contains modified file paths
build/commit/Commit.txt - Use full export first:
1C: Export to src/cfe - Verify extension names match subdirectory names exactly
- Manually add missing paths to (relative to project root)
Commit.txt
Build External Processor No Output
Symptom: Build completes but no .erf/.epf file
Solution:
Solution:
- Check source structure includes or
ObjectModule.bslManagerModule.bsl - Verify XML metadata files present
- Look in project root and directory
build/ - Check Output panel for oscript errors
Incremental Update Applies Wrong Files
Symptom: Unrelated modules changed after update
Solution:
Solution:
- format must be: one file path per line, relative to project root
Commit.txt - Use forward slashes: not
src/cf/Documents/Doc1.xmlsrc\cf\Documents\Doc1.xml - No empty lines or comments in
Commit.txt - Regenerate with after known state
1C: Export update to src/cf
TypeScript API (for Extension Development)
If extending this project:
typescript
import * as vscode from 'vscode';
// Access extension context
const ext = vscode.extensions.getExtension('asweetand-a11y.devtool1c');
if (ext) {
const api = await ext.activate();
}
// Register custom command
vscode.commands.registerCommand('1c-dev-tools.customCommand', () => {
// Execute oscript
const terminal = vscode.window.createTerminal('1C Tools');
terminal.sendText('oscript build.os');
});
// Read env.json configuration
const workspaceRoot = vscode.workspace.workspaceFolders?.[0].uri.fsPath;
const envPath = path.join(workspaceRoot, 'env.json');
const envConfig = JSON.parse(fs.readFileSync(envPath, 'utf8'));
const ibConnection = envConfig.default['--ibconnection'];References
- OneScript documentation: https://oscript.io/
- Vanessa-Runner schema: https://github.com/vanessa-opensource/vanessa-runner
- Example project setup: https://github.com/asweetand-a11y/DevTool1C
License: MIT
Language: TypeScript
Platform: Cursor IDE on Windows
Language: TypeScript
Platform: Cursor IDE on Windows