
Debugging SUP/SMP Hybrid Web Container Workflows with WEINRE
Debugging an SUP API Native Application layout and presentation is a matter of getting the code and analyzing the flow of the application and so on and in 99.99% of the time the visual layout of the application is not really a concern as developers know where and how to modify the application layout and make the necessary changes as required and this can be done on the development IDE.
But for an HWC Workflow Application, things are quite different as we don’t have the tools to know why a certain text area is not appearing, or why a certain CSS style has not been applied. For web developers, the first thing that they will think of is the likes of Firebug, Google Chrome Inspector that will basically allow them to debug, Monitor, and edit Javascript, DOM, HTML and CSS on any web page, introducing changes on the fly on their visual layout of their web pages to check if it fulfils the Visual requirements.
One way to debug the visual layout of a certain workflow is by using WEINRE Web Server.
WEINRE allows a remote interaction with Javascript, DOM, HTML, CSS on a target device (iOS,WM,BB,Android). Via its web console, WEINRE allows viewing web Elements, Resources, executing some Javascript on the devices using the console, modifying the DOM of a Workflow etc... The powerful thing about the usage of WEINRE is that it allows all this to be done remotely, as some devices have restrictions on using Web Debugging tools.
Requirements:
To debug a Web container application, the following components are needed:
Please note that WEINRE does not necessarily need to be installed on the machine hosting SUP server and can be installed on any machine as long as the device can communicate with the latter.
WEINRE installation:
WEINRE has 3 different components:
1 - Installing and Running WEINRE Debug Server :
npm install weinre
weinre --boundHost -all-
6.
2 - Running the Debug Client:
Figure 1: Debug Client Web Interface
Debugging the workflow:
1 - Pointing the Workflow (Debug Target device) to the Debug Server script:
Figure 2: Code to be added in Custom.js file in the workflow project
2 - Debugging the Workflow layout on the device:
Figure 3: Connected device shown in green under Target
Figure 4: Highlighted input text with its CSS and html attributes
Figure 5: Highlighted input text with on the device when highlighting the code in the Debug Client
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
12 | |
11 | |
11 | |
11 | |
9 | |
8 | |
7 | |
7 | |
7 |