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
Lauri Nevala 3e986e4057 Resolved remaining conflicts
Resolved conflicts while rebasing after pulling from remote

Exit pipeline if extensions build or tests fail (#1370)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>

Simplify pages/menus/registry extension api internal implementation (#1364)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Co-authored-by: Roman <ixrock@gmail.com>

Resolved conflicts in rebase from master

Updated docs to sentence case throughout

Changed mkdoc.yml nav to sentence case

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

Changed headings to sentence case throughtout docs

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

Changed all titles and headings back to title case throughout docs and in mkdocs.yml nav

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

Updated docs to sentence case throughout

Changed mkdoc.yml nav to sentence case

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

Changed headings to sentence case throughtout docs

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

Changed all titles and headings back to title case throughout docs and in mkdocs.yml nav

Signed-off-by: Paul Williams <pawilliams@mirantis.com>
2020-11-13 10:17:48 -08:00

1.0 KiB

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.

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.

/Applications/Lens.app/Contents/MacOS/Lens

You can alos use Console.app to view logs from Lens.

On linux, you can get PID of Lens first

ps aux | grep Lens | grep -v grep

And get logs by the PID

tail -f /proc/[pid]/fd/1 # stdout (console.log)
tail -f /proc/[pid]/fd/2 # stdout (console.error)