Test and Debug Web Module
Test and Debug
In Eclipse, import Red App plug-in with the previously built Web Module into your workspace and add it to your run configuration.
Launch Sabre Red 360 from Eclipse and your modules will be loaded
When you edit any typescript source files, you need to run
ngv build command
again before copying the files to your Eclipse plug-in.
Reloading Web Modules
During TypeScript development, you can auto reload code changes in TS/JS/HTML files without restarting Sabre Red 360 application by pressing CTRL+R or by clicking View→Reload from Menu (shown in below screenshot).
This will auto reload your Web Modules.
Debugging Web Modules in SR360
To debug any TypeScript Web Module, follow the below step-by-step procedure.
Enable JxBrowser remote debug capability.
Prepare JxBrowser to start in debug mode by setting below VM argument in run configurations.
sabre.ini in SR360 installer:
XX is next number of vmarg property in
Access debug tool.
Setting the above property enables user to access debug tool either by opening "chrome://inspect/dev#devices" from any browser that based on chromium engine when Sabre Red 360 desktop is already up and running.
Under Remote Target should be visible section page which represents Sabre Red 360.
|Sometimes it takes a few seconds for SR360 page to appear.|
Below title and address there are few buttons. Press first of them which is inspect.
Then new browser window should be opened. Inside it whole Sabre Red 360 should be displayed as well as Chrome DevTools.
Loading external Web Modules in eclipse
It is possible to load any Web Module without including it into redapp, purely for testing purposes.
All you need to do is to change
com.sabre.edge.dynamo.web.module.path VM parameter to path pointing at webmodule’s
build/prod or other
Additionally, this property supports loading multiple Web Modules by passing comma separated paths.