If you are debugging your ExtJS application, it could be helpful from time to time to restart the application. Sure, simply pressing F5 usually does the trick, but it might happen that you want to keep the state of the application and just restart the viewport.

This is simply done by typing the following lines in your favorite JavaScript console:

  1. Remove existing viewport with a ComponentQuery


Ext.ComponentQuery.query('viewport')[0].removeAll();



  2. Recreate viewport, here the viewport's class name is _myApp.myClass_


Ext.create("myApp.myClass");