UNPKG

debug-time-machine-cli

Version:

๐Ÿš€ Debug Time Machine CLI - ์™„์ „ ์ž๋™ํ™”๋œ React ๋””๋ฒ„๊น… ๋„๊ตฌ

116 lines (86 loc) โ€ข 2.14 kB
# 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 ```