Projects
View on GitHub
SuperMonster003/AutoJs6-VSCode-Extension
About
Debugger for AutoJs6 on VSCode (VSCode 平台的 AutoJs6 调试器)
Developer ToolsWhat you can do
- 在 VSCode 中连接设备并操作 AutoJs6 的脚本或项目 (运行 / 停止 / 保存 等)
- 在 VSCode 中实时显示 AutoJs6 的日志
- 扫描二维码建立连接, 局域网内自动发现开启服务端模式的设备 (AutoJs6 6.8.0+)
- 配对确认: 未知设备接入前询问, 扫码连接的设备自动信任, 可管理已信任设备
Measured star growth
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
.readme/README-en.md
OriginalAutoJs6 VSCode Extension
Languages
- 简体中文 [zh-Hans]
- 繁體中文 (香港) [zh-Hant-HK]
- 繁體中文 (台灣) [zh-Hant-TW]
- English [en] # current
- Français [fr]
- Español [es]
- 日本語 [ja]
- 한국어 [ko]
- Русский [ru]
- العربية [ar]
AutoJs6 VSCode development extension
- A VSCode extension for debugging and running AutoJs6 scripts
- Cloned (Clone) from hyb1996/Auto.js-VSCode-Extension
Installation (Install)
- VSCode menu
View-Extensions[ Ctrl+Shift+X ] - Search for "AutoJs6" or "003"
- Select "AutoJs6 VSCode Extension" and install or update it
Features (Features)
- Connect devices in VSCode and manage AutoJs6 scripts or projects (run, stop, save, etc.)
- Display AutoJs6 logs in real time in VSCode
- Connect by QR code and discover devices running server mode on the local network (AutoJs6 6.8.0+)
- Pairing confirmation asks before accepting an unknown device, trusts QR-paired devices automatically, and lets you manage trusted devices
- Browse, edit, upload, download and delete device files, run device scripts, and transfer large files in chunks with progress (AutoJs6 6.8.0+)
- Pull project changes from a device (device edits -> local files, with per-file diff previews)
- Heartbeats, automatic reconnection and a status-bar device indicator
- A local HTTP command bridge lets external tools invoke extension commands
- Interface text follows the VSCode display language (Simplified Chinese / English), or can be pinned through
autojs6.language
Usage (Usage)
- Basic operations
< Command Palette >- VSCode menu
View-Command Palette[ Ctrl+Shift+P ]
- VSCode menu
< Developer Tools >- VSCode menu
Help-Toggle Developer Tools
- VSCode menu
< Menu buttons >- Buttons at the top of the VSCode title area provide quick file/project operations
- Connect to the computer
- Open
< Command Palette >and selectAutoJs6: Connect[ Ctrl+Alt+F6 ], or click the corresponding menu button - Choose one of the following connection methods
Server | LAN- Enable "Client mode" in the AutoJs6 drawer
- Enter a local IP address shown by VSCode (the extension listens on
6347; allow it through the firewall and change it withautojs6.server.port)
Server | QR Code- VSCode displays the connection QR code for this computer; you can switch network interfaces
- In the AutoJs6 (6.8.0+) drawer, select "Client mode" and use the scan button beside the address field to scan the code and connect automatically
Client | LAN- Enable "Server mode" in the AutoJs6 drawer (listening on
7347) - In VSCode, enter the IP address or hostname of the AutoJs6 device, optionally with a port (such as
192.168.1.5:7347or[fe80::1]:7347) - After an unexpected disconnect, the extension reconnects automatically with exponential backoff for 5 minutes by default (disable with
autojs6.connection.autoReconnect); VSCode restores the last connection after restarting (autojs6.connection.restoreOnStartup) - An explicit disconnect from either side (VSCode commands or the AutoJs6 drawer/manager) stops automatic reconnection
- Enable "Server mode" in the AutoJs6 drawer (listening on
Client | Android Debug Bridge (ADB)- Enable "Server mode" in the AutoJs6 drawer
- Connect the AutoJs6 device to the computer running VSCode through USB
- Enable USB debugging on the AutoJs6 device and allow it to trust the computer
- The procedure varies by device; consult its manufacturer's manual or relevant online documentation
History (IP)- Successful device IP addresses are saved in a selection list
- Enable "Server mode" in AutoJs6
- A device's IP address may change
- Use "Clear" to remove all saved records
- A VSCode message
AutoJs6 device connected: ${DEVICE} (${IP_ADDRESS})confirms the connection
- Run commands
- Open
< Command Palette >to view and run supported commands; shortcuts are listed under "Commands" below - For example,
AutoJs6: RunandAutoJs6: Stop All - Some operations also have corresponding menu buttons
- View logs
- Choose one of the following ways to view logs from AutoJs6
- Use the
OUTPUTpanel[ F12 ]opened after connecting; each device has its own panel - Click the
AutoJs6: Nstatus-bar indicator, select a device and choose "Show logs"
- Use the
- After disconnection, the panel is retained and marked disconnected by default;
autojs6.log.disposeChannelOnDisconnectcan remove it automatically - Enable the extension's own debug logs through
autojs6.log.debug; they appear inAutoJs6 VSCode Extension Debug
- Manage device files (AutoJs6 6.8.0+)
- Click the
AutoJs6activity-bar icon and browse connected devices' working directories and external storage in "Device Files (Device Files)" - Click a file to open it in the editor; saving in VSCode writes changes directly back to the device
- Context menus and inline buttons run scripts, create folders/files, upload current or local files, download, rename and delete
- Choose "Upload folders here (Upload Folders)" on a device directory to select multiple local folders. Selected names, subdirectories and empty directories are preserved; existing directories are merged, matching files overwritten, and other device files retained. Uploads show the current path and support cancellation while keeping uploaded content; symlinks and unsupported file types are skipped with a notice
AutoJs6: Browse Device Filesadds a device directory to Explorer as a workspace folder
- Disconnect
- Choose one of the following ways to close all connections between AutoJs6 and VSCode
- Open
< Command Palette >and selectAutoJs6: Disconnect All[ Ctrl+Alt+Shift+F6 ] - Turn off the relevant client/server switch in the AutoJs6 drawer
- Disconnect the USB connection of AutoJs6 (only for ADB (USB) connections)
- Exit the AutoJs6 app or close VSCode
- Open
Commands (Commands)
- View online documentation (View Online Document)
[ Alt+Shift+F6 ]- Open the AutoJs6 online developer documentation
- Connect a device (Connect)
[ Ctrl+Alt+F6 ]- Connect AutoJs6 and VSCode
- The relevant AutoJs6 switches may need manual enablement
- Show connection QR code (Show QR Code)
[ CTRL+ALT+6 Q ]- Show a QR code for the AutoJs6 client mode to scan
- Disconnect all (Disconnect All)
[ Ctrl+Alt+Shift+F6 ]- Close every established connection
- The relevant AutoJs6 switches may be reset
- Disconnect a device (Disconnect Device)
- Select the device to disconnect
- Reconnect the last device (Reconnect)
- Retry a reconnecting target immediately, or restore the last successful LAN/ADB connection
- Stop automatic reconnection (Cancel Reconnect)
- Stop all ongoing automatic-reconnection sessions
- Pull project changes from a device (Pull Project from Device)
- Compare the device copy with the local project, select new/modified device files to pull, and preview each diff
- Manage trusted devices (Manage Trusted Devices)
- View and remove trusted AutoJs6 devices; a removed device requires confirmation the next time it connects
- Select a device (Select Device)
- List connected devices and choose an action (logs, run, save, browse files or disconnect), also available through the status-bar indicator
- Run script (Run)
[ F6 ]- Run the script corresponding to the current VSCode
- Applies to all connected devices
- Rerun script (Rerun)
- Stop and rerun the script corresponding to the current VSCode
- Applies to all connected devices
- Stop current script (Stop)
[ Ctrl+F6 ]- Stop the script corresponding to the current VSCode
- Applies to all connected devices
- Stop all scripts (Stop All)
[ Ctrl+Shift+F6 ]- Stop all running scripts
- Applies to all connected devices
- Save to all devices (Save)
- Save the current file to the AutoJs6 working directory of connected devices
- Applies to all connected devices
- Run on a selected device (Run On Device)
- Open the device menu and choose where to run the script corresponding to VSCode
- Save to a selected device (Save To Device)
- Open the device menu and choose where to save the script corresponding to VSCode
- New project (New Project)
[ CTRL+ALT+6 N ]- Select an empty folder, creating one if needed, for a new AutoJs6 project
- After creating a project, run
npm run dts-linkornpm run dtsto deploy declarations
- Run project (Run Project)
[ CTRL+ALT+6 R / Alt+F6 ]- Run an AutoJs6 project
- Save project to device (Save Project)
[ CTRL+ALT+6 S ]- Save an AutoJs6 project incrementally; propagating file deletions to the device requires AutoJs6 6.8.0+
- Resynchronize the entire project (Resync Project)
- Send every project file to the device and overwrite matching files
- Browse device files (Browse Device Files)
- Add a device directory to Explorer as a workspace folder (AutoJs6 6.8.0+)
Settings (Settings)
| Setting | Default | Description |
|---|---|---|
autojs6.language |
auto |
Interface language: auto follows the VSCode display language; en or zh-cn pins it. Command titles and setting descriptions always follow VSCode; reload the window to apply every change |
autojs6.server.port |
6347 |
Extension listening port, used by AutoJs6 client mode |
autojs6.server.confirmUnknownDevices |
true |
Ask before accepting an unknown client-mode device; QR-paired or previously allowed-and-remembered devices need no confirmation |
autojs6.client.port |
7347 |
Default port for AutoJs6 server mode |
autojs6.http.enabled / autojs6.http.host / autojs6.http.port |
true / 127.0.0.1 / 10347 |
Local HTTP command bridge, for example http://127.0.0.1:10347/exec?cmd=run&path=... |
autojs6.adb.path |
Empty | Path to the adb executable or its directory; an empty value enables autodetection |
autojs6.discovery.enabled |
true |
Discover AutoJs6 6.8.0+ devices running server mode through mDNS (_autojs6._tcp) when connecting over LAN |
autojs6.connection.connectTimeout / handshakeTimeout |
8000 / 6000 |
Connection and handshake timeouts in milliseconds |
autojs6.connection.heartbeatInterval / heartbeatTimeout |
15000 / 10000 |
Heartbeat interval and timeout in milliseconds; interval 0 disables heartbeats |
autojs6.connection.autoReconnect / maxReconnectAttempts |
true / 0 |
Reconnect unexpected disconnections of extension-initiated connections; 0 attempts means unlimited |
autojs6.connection.reconnectTimeout / reconnectMaxDelay |
300 / 10000 |
Reconnection-session window in seconds (0 means unlimited) and maximum backoff in milliseconds |
autojs6.connection.restoreOnStartup |
true |
Restore the last successful device connection at VSCode startup, except explicit disconnections |
autojs6.log.showChannelOnConnect |
true |
Show the log panel automatically when a device connects |
autojs6.log.disposeChannelOnDisconnect |
false |
Remove the log panel when a device disconnects |
autojs6.log.debug |
false |
Record extension debug logs |
autojs6.save.keepRelativePath |
true |
Preserve workspace-relative directories when saving files (AutoJs6 6.8.0+) |
See protocol.md for the communication protocol.
Related projects
- AutoJs6 { author: SuperMonster003 }
JavaScript automation for Android (derived project)
- AutoJs6-TypeScript-Declarations { author: SuperMonster003 }
AutoJs6 declarations (code completion)
- Auto.js-VSCode-Extension { author: hyb1996 }
Auto.js development extension for VSCode
- Auto.js-VSCode-Extension { author: 710850609 }
Auto.js development extension for VSCode (derived project)
- Auto.js-VSCode-Extension { author: kkevsekk1 }
Auto.js development extension for VSCode (derived project)
Changelog
v1.1.0
2026/09/16
FeatureThe "AutoJs6" activity-bar view contains a "Devices (Devices)" list and "Device Files (Device Files)" tree for browsing, opening, editing, uploading, downloading, renaming and deleting device files and running scripts (requires AutoJs6 6.8.0+)FeatureUpload multiple local folders from the device-files view, preserving subdirectories and empty directories, merging matching directories and overwriting matching files, with progress and cancellationFeatureTheautojs6fs://remote filesystem opens device files directly in the editor and saves them back; "Browse Device Files" adds a device directory to the workspaceFeatureQR connections: "Server | QR Code" displays this computer's connection code, and AutoJs6 6.8.0+ client mode connects after scanningissue #12FeatureProtocol v2: application-level heartbeats (ping/pong) detect half-open connections; extension-initiated LAN/ADB connections reconnect after unexpected disconnectionissue #3issue #13FeatureReconnection sessions use exponential backoff after unexpected disconnection, for 5 minutes by default with configurable attempts/window/maximum interval; VSCode restores the last connection after restarting (autojs6.connection.restoreOnStartup). Add "Reconnect last device (Reconnect)" and "Stop automatic reconnection (Cancel Reconnect)", with status-bar progressFeatureDisconnection noticebye: either side informs the peer of explicit disconnection, preventing reconnection and startup restoration; VSCode sendsbye(shutdown)on shutdown so AutoJs6 (6.8.0+) can reconnect laterFeaturePairing confirmation offers "Allow and remember / Allow once / Deny" for unknown client-mode devices; QR connections use a one-time token for automatic trust. Add "Manage trusted devices (Manage Trusted Devices)" andautojs6.server.confirmUnknownDevices; AutoJs6 6.8.0+ shows "Waiting for VSCode confirmation"FeatureLAN discovery (mDNS): "Client | LAN" automatically lists AutoJs6 6.8.0+ devices with server mode and LAN discovery enabled; disable withautojs6.discovery.enabledFeatureLarge transfers split reads/writes exceeding 1 MiB into 1 MiB chunks, with cancellable progress (AutoJs6 6.8.0+)Feature"Pull project changes from device (Pull Project from Device)" compares the device copy to the local project, lists added/modified files, previews per-file diffs and pulls selected changes (AutoJs6 6.8.0+ comparesmd5fromfs.list; older versions compare contents)FeatureLocalization follows the VSCode display language (Simplified Chinese / English), including command titles and setting descriptions (vscode.l10n)FeatureStatus-bar device indicator for quickly selecting run, save, logs or disconnect actionsFeatureSettings (autojs6.*) cover listening ports, HTTP command-service address/port, adb path, connection/handshake/heartbeat timeouts, reconnection, log panels and relative save pathsFeatureConnection addresses accept hostnames and custom ports (host:port,[ipv6]:port)issue #20Feature"Resynchronize entire project (Resync Project)" forces a complete overwrite of the device projectissue #29FixFix activation failures when port 6347/10347 is occupied, such as with multiple VSCode windows, causing all commands to report "not found"issue #14issue #15FixFix device discovery on Linux / macOS when parsingadb deviceswith Windows line endings; add adb autodetection (ANDROID_HOME,ANDROID_SDK_ROOT, common installation paths) andautojs6.adb.pathissue #35FixFix the invertedoverrideflag during incremental sync and failed device deletion whendeletedFilescontains backslashes on Windows (requires matching AutoJs6 6.8.0+)issue #29FixFix "Stop current script" and "Save" selecting the wrong editor when focus is in the output panelFixFix exceptions from accessing disposed connections after handshake timeout or disconnectionFixHandle output panels after device disconnection: retain and mark them disconnected by default, or remove automatically withautojs6.log.disposeChannelOnDisconnectissue #30FixRemove port forwarding when an ADB connection closesFixFix occasional false "Cannot reconnect ..., stopped retrying" messages after unexpected disconnection (previously stopped after 5 attempts, about 31 s); show failure once at the end of the reconnection window with "Retry" / "Do not restore automatically"ImprovementInclude workspace-relative paths when saving/running files; AutoJs6 6.8.0+ preserves the directory structure in its working directoryissue #37ImprovementThe HTTP command service listens only on127.0.0.1by default (previously0.0.0.0), preventing other LAN hosts from invoking local commandsImprovementFilter virtual interfaces such as Hyper-V / VirtualBox / Docker / WSL, and prioritize the default-gateway interfaceissue #12ImprovementReduce QR-code density through a shorter payload and lower error correction, and add a size slider to help AutoJs6 focus when scanningImprovementSkipignoredirectories such asnode_modulesdirectly during project traversal and remove full-package byte debug dumpsImprovementSeparate protocol/device/UI/remote-file/QR modules and add pure Node.js unit tests (npm test)ImprovementBundle with esbuild, reducing vsix from 9.6 MB to about 1 MB; replacepinyin/systeminformationwithtiny-pinyinand system routing-table discoveryImprovementAdd port explanations and theprotocol.mdprotocol document to READMEissue #10
v1.0.13
2026/03/14
ImprovementRefactor device-side Socket framing: replace text headers with a fixed 8-byte binary header (int32BE length + type)ImprovementParse TCP streams with a cumulative-buffer frame loop for reliable partial and concatenated framesImprovementValidate frame types and maximum lengths to detect protocol desynchronization early and prevent abnormal memory growthImprovementRemove unnecessary string intermediates when sending JSON and binary data
v1.0.12
2025/04/14
FixFix server-mode connection failures caused by incorrect version checksissue #27ImprovementNew projects can use thedts-linkscript task to create a symlink to AutoJs6 declarations automaticallyissue #8
Multilingual documentation
Edit the language JSON and templates in .readme/ and .changelog/, then regenerate the documents. Do not edit generated Markdown directly. The root README uses Simplified Chinese. These commands require Python 3.10 or newer without extra Python packages; Windows can use py instead of python. --check validates languages, fields, historical versions and dates, punctuation, and generated files without writing. CI runs the same check.
python .python/generate_markdown.py
python .python/generate_markdown.py --check
python -m unittest discover -s .python/tests
Explore related projects
Loading…