Debugging Message Action processing through the Framework

415
5
11-21-2023 07:30 PM
Labels (2)
MarkJTurnbull
New Contributor III

Hey ExB custom widget developers.

I was wondering if there is some way to debug message actions being processed through the Framework?

I am building a custom action that selects features in another layer via database relationships, which I have working, however I need this selection to trigger a filter on some associated dataviews (these dataviews have a pre-defined filter on the selection datasource). This part of the process is not working. I have debug in the action code to indicate that the message is being published with a valid selection set but I can't see why the framework is failing to filter the dataviews.

Any suggestions on how to further debug this process?

Thanks

Mark

0 Kudos
5 Replies
FredericPoliart_EsriAU
Occasional Contributor II

As far as I know, Experience Builder does not have a built-in debugging feature specifically for custom widgets or message actions. However, developers typically use browser developer tools to debug JavaScript code in web applications. 

- Browser Developer Tools

- console.log()
.. but I am guessing you already tried that. 

0 Kudos
MarkJTurnbull
New Contributor III

Hey Fred,

Yes, already tried the logging to the console but only get as far as logging the published message (DataRecordsSelectionChange or DataRecordSetChange), can't see what the framework does beyond that.

0 Kudos
FredericPoliart_EsriAU
Occasional Contributor II

Alternatively,  create a custom widget called "logger" that listens to all actions and events , and dumps to console.log() ..  like a spy_widget 

https://community.esri.com/t5/arcgis-experience-builder-questions/bd-p/arcgis-experience-builder-que...  

0 Kudos
MarkJTurnbull
New Contributor III

Hey again Fred,

The problem with creating custom spy action is that it takes the functionality away from the framework, so I don't believe that will work.

0 Kudos
JeffreyThompson2
MVP Regular Contributor

Have you tried the React Developer Tools add-on? It adds some extra panels to your browser console allowing you to directly inspect props and state.

JeffreyThompson2_0-1700661288184.png

 

GIS Developer
City of Arlington, Texas