1c-devtools-cursor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese1C Dev Tools for Cursor
适用于Cursor的1C开发工具
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.
由ara.so开发的Skill——开发工具技能合集。
一款为Cursor IDE打造的扩展,为1C:Enterprise 8生态系统提供全面的开发工具,支持命令面板集成、任务树导航、配置管理、扩展处理以及BSL调试功能。
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
1C开发工具将1C:Enterprise开发工作流集成到Cursor IDE中:
- 信息库管理:创建、更新、导出/导入数据库
- 配置操作:从源代码(src/cf)加载/卸载配置、构建.cf文件
- 扩展管理:管理多个扩展(src/cfe)、编译.cfe文件
- 外部文件:构建与反编译外部报表/处理器
- 依赖管理:初始化与管理packagedef依赖
- 启动工具:从IDE中启动Enterprise或Configurator
- BSL调试:附加调试器,支持变量查看、监视表达式与调用栈导航
所有命令可通过以下方式访问:
- 1C开发工具面板
- 命令面板(Ctrl+Shift+P)
- 底部面板的任务树
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
- Node.js 18.x或更高版本
- OneScript (oscript) - 脚本执行引擎:https://oscript.io/
- Windows环境变量:创建变量,指向
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
- 打开Cursor IDE
- 按下→ "Extensions: Install from VSIX"
Ctrl+Shift+P - 选择文件
.vsix - 重启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 updates当项目根目录存在文件时,扩展将自动激活。
packagedef项目结构:
project-root/
├── packagedef # 项目清单(激活扩展必需)
├── env.json # 连接参数
├── launch.json # 调试配置
├── tasks.json # 自定义任务
├── oscript_modules/ # OneScript模块覆盖
├── src/
│ ├── cf/ # 配置源代码
│ └── cfe/ # 扩展源代码(每个扩展对应一个子目录)
└── build/
├── ib/ # 信息库
└── commit/
└── Commit.txt # 增量更新的变更文件列表Configuration
配置
env.json - Connection Parameters
env.json - 连接参数
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
在项目根目录创建:
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"
}
}关键参数:
- : 文件库路径(
--ibconnection)或服务器地址(/F./build/ib)/S<server>\<base> - : 平台版本(例如:
--v8version)8.3.27 - : 安装路径
--v8-platform-root - : 调试服务器主机名(本地使用计算机名称)
--debug-server - : RDBG端口范围
--debug-port-range
launch.json - Debug Configurations
launch.json - 调试配置
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: , , , , , , , , , , , , , , ,
ClientManagedClientWebClientComConnectorServerServerEmulationWebServiceHttpServiceODataJobJobFileModeMobileClientMobileServerMobileJobFileModeMobileManagedClientMobileManagedServer创建:
.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可选值:, , , , , , , , , , , , , , ,
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
}
}扩展会自动管理调试服务器:
dbgs.exe- 本地:激活时自动启动服务器
- 远程:尝试建立连接
- 协议:仅支持HTTP(在Configurator中配置)
微调调试时序可通过设置项():
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+P通过命令面板( → "1C: ..." 或 "1С: ...")或1C开发工具面板访问。
Ctrl+Shift+PInformation Base
信息库
1C: Create empty infobase
1C: Post-update processing
1C: Prohibit external resources
1C: Export to dt / Import from dt1C: 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/cf加载/导出源代码:
1C: Load from src/cf # 从源代码加载完整配置
1C: Update from src/cf # 增量更新(使用build/commit/Commit.txt)
1C: Export to src/cf # 完整导出到源代码
1C: Export update to src/cf # 仅导出变更内容二进制文件操作:
1C: Load from 1Cv8.cf # 导入.cf文件
1C: Export to 1Cv8.cf # 导出配置
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/cfe源代码操作:
1C: Load from src/cfe # 从源代码加载所有扩展
1C: Export to src/cfe # 将所有扩展导出到源代码
1C: Export update to src/cfe # 仅导出变更的扩展
1C: Update from src/cfe # 增量更新(使用Commit.txt)二进制文件操作:
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 cache1C: Build external report/processor # 编译外部文件
1C: Disassemble external report/processor
1C: Clear cacheDependencies
依赖管理
1C: Initialize packagedef # Create dependency manifest
1C: Install dependencies
1C: Remove dependencies1C: Initialize packagedef # 创建依赖清单
1C: Install dependencies
1C: Remove dependenciesLaunch
启动
1C: Launch Enterprise # Start client application
1C: Launch Configurator # Open Configurator1C: Launch Enterprise # 启动客户端应用
1C: Launch Configurator # 打开ConfiguratorDebugging BSL Modules
BSL模块调试
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)
- 在文件中设置断点(点击左侧边距)
.bsl - 按下或选择Run → Start Debugging
F5 - 选择配置:"1C: Launch with background jobs" 或 "1C: Attach"
- 扩展连接到指定端口的
dbgs.exe - 启动1C:Enterprise(手动或通过命令)
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
监视面板(添加表达式):
- 在编辑器中右键点击变量 → "在单独窗口中显示值"
- 点击监视面板顶部的"计算值"按钮
- 输入表达式:
Query.TemporaryTablesManager.Tables[0]
支持的类型:
- Структура (Structure):展开显示字段与值
- Соответствие (Map):展开显示键/值对
- ТаблицаЗначений (ValueTable):显示列、索引、行、
[0]等[1] - МенеджерВременныхТаблиц (TempTablesManager):显示临时表树
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
在编辑器中右键点击 → "计算值":
bsl
// 在暂停的上下文环境中,执行以下表达式:
Query.TemporaryTablesManager.Tables[0].GetColumns()
Result.Find("MyValue", "FieldName")
Collection.Count() > 10结果将以表格形式显示:属性 | 值 | 类型
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.
F10 - 单步跳过
F11 - 单步进入
Shift+F11 - 单步退出
F5 - 继续
Shift+F5 - 停止扩展会通过优化的 ping 间隔自动刷新调用栈与变量。
Common Patterns
常用模式
Initial Project Setup
初始项目设置
bash
undefinedbash
undefined1. Create project structure
1. 创建项目结构
mkdir my-1c-project
cd my-1c-project
mkdir -p src/cf src/cfe build/ib build/commit
mkdir my-1c-project
cd my-1c-project
mkdir -p src/cf src/cfe build/ib build/commit
2. Initialize packagedef
2. 初始化packagedef
Open in Cursor, press Ctrl+Shift+P → "1C: Initialize packagedef"
在Cursor中打开项目,按下Ctrl+Shift+P → "1C: Initialize packagedef"
3. Create env.json (see Configuration section)
3. 创建env.json(参考配置章节)
4. Create empty infobase
4. 创建空信息库
Ctrl+Shift+P → "1C: Create empty infobase"
Ctrl+Shift+P → "1C: Create empty infobase"
undefinedundefinedLoad Configuration from External Source
从外部源加载配置
bash
undefinedbash
undefined1. Place 1Cv8.cf in project root
1. 将1Cv8.cf放置在项目根目录
2. Ctrl+Shift+P → "1C: Load from 1Cv8.cf"
2. Ctrl+Shift+P → "1C: Load from 1Cv8.cf"
3. Export to sources: "1C: Export to src/cf"
3. 导出到源代码:"1C: Export to src/cf"
undefinedundefinedIncremental 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.bsl- 在Configurator中工作,进行变更
- 导出变更:
1C: Export update to src/cf - 提交到版本控制
- 团队成员更新:(读取
1C: Update from src/cf)build/commit/Commit.txt
build/commit/Commit.txt格式(每行一个文件):
src/cf/Documents/Документ1/Ext/ManagerModule.bsl
src/cf/Catalogs/Справочник1.xml
src/cfe/Extension1/Documents/Документ1/Ext/ObjectModule.bslWorking with Multiple Extensions
多扩展协作
bash
undefinedbash
undefinedExtensions stored in subdirectories:
扩展存储在子目录中:
src/cfe/
├── Extension1/
│ ├── Configuration.xml
│ └── Documents/...
└── Extension2/
├── Configuration.xml
└── Catalogs/...
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 all
undefined1C: Load from src/cfe # 加载Extension1 + Extension2
1C: Export update to src/cfe # 导出所有扩展的变更
undefinedBuild 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
bsl
// src/ExternalReports/MyReport/ObjectModule.bsl
Процедура ПриКомпоновкеРезультата(ДокументРезультат, ДанныеРасшифровки, СтандартнаяОбработка)
// 报表逻辑
КонецПроцедуры- 将源代码放置在目录
src/ExternalReports/MyReport/ - →
Ctrl+Shift+P1C: Build external report/processor - 选择
MyReport - 输出结果:项目根目录下的
MyReport.erf
Debug BSL Code Example
BSL代码调试示例
bsl
// CommonModule.bsl
Функция ВыполнитьЗапрос(ТекстЗапроса)
Запрос = Новый Запрос;
Запрос.Текст = ТекстЗапроса;
// Set breakpoint here ⬅
Результат = Запрос.Выполнить();
ТЗ = Результат.Выгрузить();
Возврат ТЗ;
КонецФункцииWhen stopped at breakpoint:
- Add to Watch
Запрос - Expand
Запрос.МенеджерВременныхТаблиц.Таблицы - Right-click → "Show value in separate window" (after step-over)
ТЗ
bsl
// CommonModule.bsl
Функция ВыполнитьЗапрос(ТекстЗапроса)
Запрос = Новый Запрос;
Запрос.Текст = ТекстЗапроса;
// 在此处设置断点 ⬅
Результат = Запрос.Выполнить();
ТЗ = Результат.Выгрузить();
Возврат ТЗ;
КонецФункции当断点触发时:
- 将添加到监视面板
Запрос - 展开
Запрос.МенеджерВременныхТаблиц.Таблицы - 右键点击→ "在单独窗口中显示值"(单步跳过之后)
ТЗ
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
症状:1C开发工具面板不可见
解决方案:
解决方案:
- 确保项目根目录存在文件
packagedef - 重启Cursor
- 检查输出面板 → "1C Dev Tools"查看错误信息
oscript Command Not Found
oscript命令未找到
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
症状:命令执行失败,提示"oscript not recognized"
解决方案:
解决方案:
- 安装OneScript:https://oscript.io/
- 创建Windows环境变量:
oscript = C:\Program Files\OneScript\bin\oscript.exe - 设置变量后重启Cursor
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
症状:无法连接到调试服务器
解决方案:
解决方案:
- 确认正在运行(任务管理器)
dbgs.exe - 检查→
launch.json与实际主机名匹配debugServerHost - 确保端口(或配置的端口)未被防火墙阻止
1560 - 在Configurator中:调试 → 更改协议为HTTP
- 手动重启调试服务器:
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
症状:监视面板为空或显示"不可用"
解决方案:
解决方案:
- 选择正确的调用栈帧(点击过程名称)
- 手动将变量名添加到监视面板(不要依赖自动检测)
- 如果是时序问题,增加设置项中的
varFetchDelayMs - 对于复杂表达式,使用"计算值"按钮替代
Load from src/cf Fails
从src/cf加载失败
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
症状:提示"Configuration load error"
解决方案:
解决方案:
- 确认存在
src/cf/Configuration.xml - 检查→
env.json路径正确--ibconnection - 确保信息库未被锁定(关闭Configurator/Enterprise)
- 先尝试执行"1C: Create empty infobase"
Update from src/cfe Skips Files
从src/cfe更新时跳过文件
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/commit/Commit.txt - 先执行完整导出:
1C: Export to src/cfe - 确认扩展名称与子目录名称完全匹配
- 手动将缺失的路径添加到(相对于项目根目录)
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
症状:构建完成但未生成.erf/.epf文件
解决方案:
解决方案:
- 检查源代码结构包含或
ObjectModule.bslManagerModule.bsl - 确认XML元数据文件存在
- 查看项目根目录与目录
build/ - 检查输出面板中的oscript错误信息
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
症状:更新后无关模块被修改
解决方案:
解决方案:
- 格式要求:每行一个文件路径,相对于项目根目录
Commit.txt - 使用斜杠:而非
src/cf/Documents/Doc1.xmlsrc\cf\Documents\Doc1.xml - 中不能有空行或注释
Commit.txt - 在已知状态下重新生成:
1C: Export update to src/cf
TypeScript API (for Extension Development)
TypeScript API(用于扩展开发)
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'];如果要扩展此项目:
typescript
import * as vscode from 'vscode';
// 访问扩展上下文
const ext = vscode.extensions.getExtension('asweetand-a11y.devtool1c');
if (ext) {
const api = await ext.activate();
}
// 注册自定义命令
vscode.commands.registerCommand('1c-dev-tools.customCommand', () => {
// 执行oscript
const terminal = vscode.window.createTerminal('1C Tools');
terminal.sendText('oscript build.os');
});
// 读取env.json配置
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
- OneScript文档:https://oscript.io/
- Vanessa-Runner schema:https://github.com/vanessa-opensource/vanessa-runner
- 示例项目设置:https://github.com/asweetand-a11y/DevTool1C
License: MIT
Language: TypeScript
Platform: Cursor IDE on Windows
Language: TypeScript
Platform: Cursor IDE on Windows