Skip to main content

Examining Constellation using DevTools

Due to the stateless nature of Constellation applications, your web browser's DevTools play an important part in debugging Constellation applications. 

In this topic, you explore some of the commands that assist you in debugging Constellation applications using your browser's DevTools. 

Browser DevTools

As we move towards employing more modern web technologies, Pega developers can make more use of typical developer tools for debugging.

Browsers come with built-in tools for inspecting and debugging front-end applications. In Chrome, Firefox, and Edge, you can open these developer tools by pressing F12 on your keyboard.

Once in the developer tools, there are a few areas of interest:

  • Console tab - Displays the working scripts on the web page. 
  • Network tab - Shows DX API calls (select filtering by Fetch/XHR). The payload of both requests and responses can be seen here.
  • Application tab - Allows inspection of items cached in Local and Session storage.

The following figure shows the location of these tabs in the Chrome browser DevTool menu:

Main menu of Chrome browser DevTools.

There are also web browser extensions that you can download and use to debug React applications.

React DevTools is a free plugin that enables you to inspect the React component hierarchies in the browser DevTools. When enabled, this extension adds a Components tab to the developer tools, as shown in the following figure:

React dev tools components.

 

Redux DevTools is a free plugin that enables you to visualize state modifications and inspect every state and action payload in the browser DevTools. When enabled, this extension adds a Redux tab to the developer tools, as shown in the following figure:

Redux dev tool logs with event and payload information.

Debugging Data Pages

Data Pages that are cached on the client side are not stored as part of Redux, but instead are stored in the application's datastore.

Run the following code in your browser's Console to log information about client-side cached Data Pages:

PCore.getDataPageUtils();

Note: The PCore and PConnect APIs are not available in the App Studio shell. To utilize methods related to PCore and PConnect, it is a best practice to launch the Portal from Dev Studio. 

The result is a list of the cached Data Pages that are located in the application's datastore, as seen in the following figure:

The list of cached Data Pages in the datastore.
Note: To learn more about using the PCore and PConnect Public APIs to debug Constellation applications, see Using PCore and PConnect Public APIs

Check your knowledge with the following interaction:


This Topic is available in the following Modules:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice