Debugging
10 min
jigx builder provides debugging capabilities in vs code to identify and fix yaml, sqlite, and app problems and errors connect your phone using the debugging qr code to troubleshoot a solution directly from the jigx app quickly locate and resolve issues preventing the application from functioning correctly or as intended examine your code, write and test sql queries in the debug tool, trace program execution, and analyze error messages or unexpected behaviors to pinpoint the root cause of the problem you can improve an application's reliability, performance, and functionality by debugging an application jigx dev tools debugging capabilities auto sensing of code issues detailed debug console separate testing environment hot reload to the connected device live updates as code changes connecting your device to jigx dev tools enable jigx dev tools by following these steps open the solution you want to debug in jigx builder click on the jigx builder icon in the activity bar in the sidebar, click the + next to connect to device enter your jigx user name and password if prompted now scan the qr code with your mobile device; you can open the qr code in full size if you having issues scanning the code if you are using a branded app, see settings docid\ wt5gz2fjak 7m94083aq1 to ensure the qr code is generated for the correct app on your device, tap enable on the jigx dev tools message the solution opens in the jigx app your device will show in jigx builder in the sidebar, with a data and functions node ensure that the vs code panel is open debugging tools there are four main tools in the jigx dev tool set that specifically target debugging jigx solutions each tool is described below problems jigx validates the structure and values in the jigx yaml files and shows the issues that you need to fix in the problems tab of the jigx dev tools pane the pane shows the jigx file, the area in the yaml that has the issue, and a badge count of the number of issues in that file, for example, all orders jigx datasources 2 drill down into the list of issues to see the short descriptions and the location clicking on the issue will take you to the line of yaml code in the file hover over the issue to see the popup that offers validation assistance and a quick fix link if applicable problems pane jigx console use the jigx console to debug your data and functions debugging data debugging data in jigx console connect your device to jigx dev tools https //docs jigx com/debugging#p8nei under the device node, click on the data node and select the sqlite data table use the ▷ icon to run the sql query in the jigx console you can run multiple sqlite queries and functions simultaneously, as each one opens in a new tab in the console panel the data table entries are listed drill down into the data entries by clicking on an item in the list, the data object is displayed in the right hand panel you can test your data by writing queries in the query editor and press the execute button to test what is being returned from the sql table once you have the correct sql query, copy it to the jig or file where needed click format to auto format your query ready for copying into your yaml code debugging functions debugging functions in jigx console connect your device to jigx dev tools https //docs jigx com/debugging#p8nei under the device node, click on the functions node and select the function to debug the function jigx file will open above the jigx console panel use the ▷ icon to run the function in the jigx console you can run multiple functions and sql queries simultaneously, as each one opens in a new tab in the console panel the function parameters are shown click execute to run the function and see the data in the console panel drill down into the data entries that are returned by clicking on an item in the list, the data is displayed in the right hand panel click clear in the right corner of the parameter panel to clear the parameters, to test your function parameteters add new values for the parameters and press the execute button to test what data is being returned required parameters are indicated with an the data type is shown next to the parameter, e g , string, or array jigx logs jigx logs records your interactions with the solution on the device when connected to the jigx dev tools jigx logs the following is logged datasource error execute expression navigate state warning ordering by default the oldest interaction is at the top, and the latest at the bottom order the list from latest at the top and the oldest at the bottom by clicking the up arrow ( ⋀ ) in the time column filtering you can filter by type or by jig, click on the filter icon next to type or jig select the options you want to display the badges next to each option shows the number of entries in the log for that option once selected click the filter button searching all columns except time can be searched using the search field detail drill into each record by clicking on the item in the list the full details for that item displays in the right hand panel clear the log use the clear logs icon to clear the log entries as soon as you interact with the solution on the device while connected to jigx dev tools the log will start populating again jigx watcher as you building out your solution in jigx builder you can monitor expressions and sql queries to see the results as you navigate the app on the device jigx watcher connect your device to jigx dev tools https //docs jigx com/debugging#p8nei open a jigx file in jigx builder locate the expression or sql query in the yaml code right click on the expression/sql query and choose add to jigx watcher the jigx watcher opens in the panel below and shows the type, value and result the result field is populated when you use the expression or sql query in a solution on your device use the show logs button to open the entry in jigx logs and view additional detail for the expression/ sql query use the remove button to remove a single item click clear in the right corner of the jigx watcher panel to clear all items in the list