Skip to Content
Author's profile photo Jamie Cawley

Debugging Sybase SUP HWC Applications

Browser based Debugging:

Google Chrome

  • Create a shortcut on your desktop for Google Chrome.
  • Add the following parameters to the shortcut command
  • allow-file-access-from-files
  • -disable-web-security

Mozilla Firefox

  • From Firefox, download and install the Firebug plugin

Apple Safari

  • Select “Show develop menu in the menu bar” from Settings -> Preferences -> Advanced

To display the Hybrid Web Container in the browser:

  • Determine the URL for the generated application (e.g. workflow_jQueryMobileLookAndFeel.html)
    • In the SUP Workspace Expand the Generated Workflow/<workflow>/html folder
    • Right-click on the workflow***.html file
    • Choose Properties Copy the Location to the clipboard
  • Determine the Key of the desired screen (e.g. Start) by selecting your workflow, the desired screen and referring to the Key within the General properties
  • Add the ?screentoshow=<screen key> URL parameter to the end of the file URL
  • Within the browser open the combined url

file:///C:/Users/<myusername>/workspace/<supprojectname>/Generated%20Workflow/ myWF/html/workflow.html?screentoshow=start (If an error occurs make sure the “?” did not get encoded with “%3F”)

Debugging with Weinre

Installation according to

  • Install nodejs –
  • Open a command prompt and type: “npm install weinre” to install npm package.  Network restrictions may cause the download to fail.
  • Create a batch file with the following making sure to change the paths if necessary.


echo navigate to http://localhost:port/client/

echo add the following to the customBeforeWorkflowLoad() function within Custom.js

echo ____

echo var headID = document.getElementByTagName(“head”)[0];

echo var newScript = document.createElement(‘script’);

echo newScript.type = ‘text/javascript’;

echo newScript.src = ‘’;

echo headID.appendChild(newScript);

echo return true;

echo ____

node “C:\Program Files\nodejs\node_modules\weinre\weinre” –httpPort 8080 –boundHost -all-

  • Run the batch file.
  • Within SUP project navigate to Generated Workflow/Project Name/html/js/Custom.js and add the following to the customBeforeWorkflowLoad method

     function customBeforeWorkflowLoad() {

             //  Please note some scenarios that should not be handled here:

             //    1)  There is no screen available before workflow load finishes

             //    2)  You cannot called any SharedStorage functions here because the url parameters

             //        have not yet been parsed and workflow setting are not yet initialized.

             var headID = document.getElementsByTagName(“head”)[0];

             var newScript = document.createElement(‘script’);

         newScript.type = ‘text/javascript’;

         newScript.src = http://<SUP Server>:8080/target/target-script-min.js#anonymous’;


             return true;



After deploying your project open http://localhost:8080/ and refer to the Weinre documentation

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hello, I tried the Chrome-solution. For "-disable-web-security" you must type "--disable-web-security".

      I have a screen with a button which calls an MBO Online Request - invoke object query: findAll.

      I click the button, but nothing happens. Works fine in HWC on a device connected via Relay Server (but no debugging options).

      Should MBO-Requests work?