debug-time-machine-cli
Version:
๐ Debug Time Machine CLI - ์์ ์๋ํ๋ React ๋๋ฒ๊น ๋๊ตฌ
116 lines (86 loc) โข 2.14 kB
Markdown
# debug-time-machine-cli
๐ **Debug Time Machine CLI** - ์์ ์๋ํ๋ React ๋๋ฒ๊น
๋๊ตฌ
## ์ค์น
```bash
npm install -g debug-time-machine-cli
# ๋๋
npx debug-time-machine-cli
```
## ์ฌ์ฉ๋ฒ
### ์๋ ์์ (๊ถ์ฅ)
```bash
# React ์ฑ๊ณผ ํจ๊ป Debug Time Machine์ ์๋์ผ๋ก ์์
debug-time-machine start-with-app "npm start"
debug-time-machine start-with-app "yarn dev"
debug-time-machine start-with-app "pnpm dev"
```
์๋์ผ๋ก ์คํ๋๋ ๊ฒ๋ค:
- โ
๋ฐฑ์๋ ์๋ฒ (ํฌํธ 4000)
- โ
Debug UI (ํฌํธ 8080)
- โ
๋ธ๋ผ์ฐ์ ์์ Debug UI ์ด๊ธฐ
- โ
์ฌ์ฉ์ React ์ฑ
### ๊ฐ๋ณ ๋ช
๋ น์ด
```bash
# Debug Time Machine ์๋ฒ๋ง ์์
debug-time-machine start --port 4000
# ํ๋ก์ ํธ ์ด๊ธฐํ
debug-time-machine init --name my-app --template react
# ์ํ ๊ธฐ๋ก
debug-time-machine record --output session.json --duration 300
# ๊ธฐ๋ก ์ฌ์
debug-time-machine replay --input session.json --speed 2
```
### ๋จ์ถ ๋ช
๋ น์ด
```bash
# dtm ๋ณ์นญ ์ฌ์ฉ ๊ฐ๋ฅ
dtm start-with-app "npm start"
dtm start
dtm init
```
## ๋ช
๋ น์ด ์ต์
### start-with-app
```bash
debug-time-machine start-with-app <command> [options]
Options:
--no-browser Debug UI๋ฅผ ๋ธ๋ผ์ฐ์ ์์ ์๋์ผ๋ก ์ด์ง ์์
```
### start
```bash
debug-time-machine start [options]
Options:
-p, --port <port> ํฌํธ ๋ฒํธ (๊ธฐ๋ณธ๊ฐ: 4000)
-h, --host <host> ํธ์คํธ ์ฃผ์ (๊ธฐ๋ณธ๊ฐ: localhost)
```
### init
```bash
debug-time-machine init [options]
Options:
-n, --name <name> ํ๋ก์ ํธ ์ด๋ฆ
-t, --template <template> ํ
ํ๋ฆฟ (react, node, express)
```
## ์์
### Create React App
```bash
debug-time-machine start-with-app "react-scripts start"
```
### Vite
```bash
debug-time-machine start-with-app "vite --port 3000"
```
### Next.js
```bash
debug-time-machine start-with-app "next dev"
```
## package.json ์คํฌ๋ฆฝํธ
```json
{
"scripts": {
"start": "react-scripts start",
"debug": "debug-time-machine start-with-app 'react-scripts start'"
}
}
```
๊ทธ๋ฌ๋ฉด ๋ค์๊ณผ ๊ฐ์ด ์ฌ์ฉํ ์ ์์ต๋๋ค:
```bash
npm run debug
```