In ArcGIS Pro, when I use Arcade in an Attribute Rule or in a Label Expression, where do I see the messages I create using the "Console()" function?
Solved! Go to Solution.
I asked this exact question (for labels not attribute rules but I am sure it's the same) in an instructor-led class yesterday. The short version of the answer is that the messages go nowhere. They go to standard output but unless Esri catches standard output and sends it someplace they just disappear.
I will be starting on developing attribute rules in a few days. It appears environment for test and debug for Arcade is pretty much non-existent.
In the meantime I tried the following:
Common, Esri staff! Please at least tell me that these messages go nowhere. (And if so, please tell me how do you debug Attribute Rules.)
I asked this exact question (for labels not attribute rules but I am sure it's the same) in an instructor-led class yesterday. The short version of the answer is that the messages go nowhere. They go to standard output but unless Esri catches standard output and sends it someplace they just disappear.
I will be starting on developing attribute rules in a few days. It appears environment for test and debug for Arcade is pretty much non-existent.
Thanks for sharing this information with me, though it is very sobering. I fear I will need to put any debug message into a string attribute of the feature being edited.
That's a good idea.
First impression: There is no way to extend Arcade, to improve it, or to call functions, or to load libraries. You can import or export a code block but you can't do it dynamically so there is no easy way to use an external IDE.
I have the same problem when debugging attribute rules. Although not as useful as console(), the dictionary keyword “errorMessage “ does help me. You can create a long custom message without having to worry how to display it, because It will show up in the error window. Example: return {"errorMessage": "this will show up in the error window."} "
I'd recommend the approach above. I do this using attribute rules, using Calculate Field-Arcade. (Don't forget it, press Verify icon first)