Files
2026-07-08 10:46:03 +07:00

39 lines
994 B
Markdown

# Neyako Tab Debugger - Thanh version
Execute JavaScript files on Chrome tabs via remote debugging.
## Setup
1. Install dependencies:
```bash
npm install
```
2. Start Chrome with remote debugging enabled:
```bash
chrome.exe --remote-debugging-port=9222 https://www.youtube.com/watch?v=dQw4w9WgXcQ
```
Or on Windows, run from PowerShell:
```powershell
& "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 https://www.youtube.com/watch?v=dQw4w9WgXcQ
```
## Usage
### Option 1: VS Code Debug Configuration
1. Open the JavaScript file you want to execute (e.g., `example.js`)
2. Press F5 or go to Run and Debug
3. Select "Execute Script on Current Tab"
4. The script will run on the currently active Chrome tab
### Option 2: Command Line
```bash
node run-script.js example.js
```
## How it works
The script connects to Chrome's DevTools Protocol on port 9222, finds the first active page tab, and executes your JavaScript code using `Runtime.evaluate`.