Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Train ChainNew to Visual Studio Code? Get it now.
Train Chain

Train Chain

gogo.gao

|
3 installs
| (0) | Free
hotel低代码平台代码自动编写插件
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Train Chain VS Code 插件

这个VS Code插件可以接收WebSocket消息并将其写入指定文件。适用于各种需要将WebSocket数据保存到文件的场景。

特性

  • 提供便捷的工具栏图标,方便快速访问
  • 支持配置WebSocket服务器地址
  • 可设置接收到的消息写入的目标文件
  • 支持启动时自动连接WebSocket服务器
  • 直观的用户界面,轻松配置所有选项
  • 状态栏显示连接状态
  • 提供输出面板,显示详细日志

使用方法

  1. 安装插件后,在活动栏中会出现Train Chain图标
  2. 点击图标,打开配置面板
  3. 在配置面板中设置以下选项:
    • WebSocket地址:要连接的WebSocket服务器地址(如:ws://localhost:8080)
    • 输出文件路径:接收到的消息将写入的文件路径(支持相对路径和绝对路径)
    • 启动时自动连接:勾选后,插件会在VS Code启动时自动连接到WebSocket服务器
  4. 点击"保存配置"按钮保存设置
  5. 点击"启动连接"按钮连接到WebSocket服务器
  6. 连接成功后,插件将接收消息并写入到指定文件

命令

插件提供以下命令(可以通过命令面板访问):

  • Train Chain: 启动 Socket 连接:连接到WebSocket服务器
  • Train Chain: 停止 Socket 连接:断开WebSocket连接
  • Train Chain: 保存配置:保存当前配置

要求

  • VS Code 1.98.0 或更高版本

扩展设置

此插件提供以下设置:

  • socketWriter.socketUrl: WebSocket服务器地址
  • socketWriter.outputFilePath: 接收到消息后写入的文件路径
  • socketWriter.autoConnect: 启动时自动连接WebSocket服务器

开发

如果您想自行开发或修改此插件:

  1. 克隆仓库
  2. 运行 npm install 安装依赖
  3. 按F5启动调试会话

许可证

MIT

Features

Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.

For example if there is an image subfolder under your extension project workspace:

![feature X](images/feature-x.png)

Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.

Requirements

If you have any requirements or dependencies, add a section describing those and how to install and configure them.

Extension Settings

Include if your extension adds any VS Code settings through the contributes.configuration extension point.

For example:

This extension contributes the following settings:

  • myExtension.enable: Enable/disable this extension.
  • myExtension.thing: Set to blah to do something.

Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

Release Notes

Users appreciate release notes as you update your extension.

1.0.0

Initial release of ...

1.0.1

Fixed issue #.

1.1.0

Added features X, Y, and Z.


Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

  • Split the editor (Cmd+\ on macOS or Ctrl+\ on Windows and Linux)
  • Toggle preview (Shift+Cmd+V on macOS or Shift+Ctrl+V on Windows and Linux)
  • Press Ctrl+Space (Windows, Linux, macOS) to see a list of Markdown snippets

For more information

  • Visual Studio Code's Markdown Support
  • Markdown Syntax Reference

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft