UNPKG

putout

Version:

🐊 Pluggable and configurable code transformer with built-in ESLint, Babel and support of js, jsx, typescript, flow, markdown, yaml and json

18 lines (13 loc) 420 B
import {bgBlueBright} from '../lib/cli/chalk.js'; export const onDebuggerExit = ({log, process, inspector}) => { const {pid} = process; process.once('exit', (code) => { if (code !== 1) return; if (!inspector.url()) return; inspector.close(); log(bgBlueBright(`node --inspect: 'kill ${pid}'`)); process.kill(pid); }); };