Skip Navigation

Test and Debug Web Module

Test and Debug

  1. In Eclipse, import Red App plug-in with the previously built Web Module into your workspace and add it to your run configuration.

  2. 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.

image

Debugging Web Modules in SR360

To debug any TypeScript Web Module, follow the below step-by-step procedure.

  1. Enable JxBrowser remote debug capability.

Prepare JxBrowser to start in debug mode by setting below VM argument in run configurations.

Example sabre.ini in SR360 installer:

vmarg.XX=-Ddynamo_testing_remote_debugging=true
Note
XX is next number of vmarg property in sabrered.ini file.
  1. 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.

image

Under Remote Target should be visible section page which represents Sabre Red 360.

Note
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.

image

Then new browser window should be opened. Inside it whole Sabre Red 360 should be displayed as well as Chrome DevTools.

image

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 build/ subfolder.

Additionally, this property supports loading multiple Web Modules by passing comma separated paths.