Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huruji/electron-dev-console
一个用于在渲染进程查看主进程输出的 electron 开发调试工具
https://github.com/huruji/electron-dev-console
Last synced: 18 days ago
JSON representation
一个用于在渲染进程查看主进程输出的 electron 开发调试工具
- Host: GitHub
- URL: https://github.com/huruji/electron-dev-console
- Owner: huruji
- Created: 2019-08-23T14:55:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T19:36:07.000Z (almost 2 years ago)
- Last Synced: 2024-11-20T13:44:44.068Z (22 days ago)
- Language: TypeScript
- Size: 1.67 MB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-github-star - electron-dev-console
README
# electron-dev-console
一个用于在渲染进程查看主进程输出的 electron 开发调试工具
![screenshot](./screenshot.jpg)
**why?**
在开发 electron 应用中,主进程可以通过 `--inspect` 来调试主进程,但是有时候打包过后的应用与开发时表现并不一致,这个时候要调试主进程却只能通过 `electron-log` 之类的日志库通过写日志的方式调试,这似乎有点笨拙,因此有了这个仓库。
## how to use
```bash
npm i -S electron-dev-console
```in renderer process
```js
import { renderer } from 'electron-dev-console'renderer.init()
```in main process
```js
import { main } from 'electron-dev-console'
const win = new BrowserWindow({
// your config
})main.init(win)
main.success('success message')
main.info('info message')
main.warn('warn message')
main.error('error message')
```