How to launch a theia extension command

If we follow the basic hello world extension, notification is shown on user action (menu action). How to trigger a command onLoad or onUnload of theia frontend (editor)


  • Display a welcome / landing page display on first load

  • When user switches tab start a countdown to limit/scale down server to save cost

[original thread by Soumesh Banerjee]

FrontendApplicationContribution provides app lifecycle hooks:

i.e. async configure hook can block the shell loading

and then there is onWillStop and onStop

you cannot do any async code on stop even, it will be ignored by a browser

so fo the second case i guess you will need some kind of ping from the frontend

[Soumesh Banerjee]

Maybe beaconAPI would be helpful for the onWillStop and onStop events else PING-PONG mechanism works as well