1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/docs/extensions/testing-and-publishing/testing.md
Paul Williams ba063417e0 Resolved conflicts in Your First Extension, Styling, and Color Reference after rebasing from master
Resolved conflicts in Your First Extension after rebasing from master

Reworked extensions/README.md

Signed-off-by: Paul Williams <pawilliams@mirantis.com>

Reworked the content in your-first-extension.md

Signed-off-by: Paul Williams <pawilliams@mirantis.com>

Reworked beginning of extension-anatomy.md

Signed-off-by: Paul Williams <pawilliams@mirantis.com>

Reworked the writing in extensions/get-started/anatomy.md

Signed-off-by: Paul Williams <pawilliams@mirantis.com>

Reworked beginning of wrapping-up.md

Signed-off-by: Paul Williams <pawilliams@mirantis.com>

Squashed 3 commits

Reworked writing in wrapping-up.md

Signed-off-by: Paul Williams <pawilliams@mirantis.com>

Reworked content throughout Extension Development > Getting Started and squashed commits

Removed extensions/capabilities/README.md and extensions/testing-and-publishing/bundling.md from mkdocs.yml nav

Signed-off-by: Paul Williams <pawilliams@mirantis.com>

Added extensions/get-started/overview.md to mkdocs.yml nav, reworked writing in extensions/get-started/wrapping-up.md and extensions/get-started/overview.md, changed links that pointed to extensions/capabilities/overview.md to go to extensions/capabilities/common-capabilities.md instead

Signed-off-by: Paul Williams <pawilliams@mirantis.com>

Changed all titles throughout docs, including in body, to title case

Signed-off-by: Paul Williams <pawilliams@mirantis.com>

Reworked bullets in extensions/get-started/anatomy.md

Signed-off-by: Paul Williams <pawilliams@mirantis.com>

Intergrated Windows instructions into your-first-extension.md, made minor edits throughout extensions/get-started and fixed a couple titles in mkdocs.yml nav

Signed-off-by: Paul Williams <pawilliams@mirantis.com>

Changed Extension Development > Get Started to Getting Started in mkdocs.yml

Signed-off-by: Paul Williams <pawilliams@mirantis.com>
2020-11-13 16:02:44 -08:00

33 lines
1.0 KiB
Markdown

# Testing Extensions
## Console.log
`console.log()` might be handy for extension developers to prints out info/errors from extensions. To use `console.log`, note that Lens is based on Electron. Electron has two types of processes: [Main and Renderer](https://www.electronjs.org/docs/tutorial/quick-start#main-and-renderer-processes).
### Renderer Process Logs
`console.log()` in Renderer process is printed in the Console in Developer Tools (View > Toggle Developer Tools).
### Main Process Logs
To view the logs from the main process is a bit trickier, since you cannot open developer tools for them. On MacOSX, one way is to run Lens from the terminal.
```bash
/Applications/Lens.app/Contents/MacOS/Lens
```
You can alos use [Console.app](https://support.apple.com/en-gb/guide/console/welcome/mac) to view logs from Lens.
On linux, you can get PID of Lens first
```bash
ps aux | grep Lens | grep -v grep
```
And get logs by the PID
```bash
tail -f /proc/[pid]/fd/1 # stdout (console.log)
tail -f /proc/[pid]/fd/2 # stdout (console.error)
```