Where do the Arcade Console messages go to?

1399
6
Jump to solution
05-12-2021 09:44 AM
Labels (1)
RalfSchmidt
New Contributor III

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?

Tags (2)
1 Solution

Accepted Solutions
BrianWilson7
Occasional Contributor III

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.

View solution in original post

6 Replies
RalfSchmidt
New Contributor III

In the meantime I tried the following:

  • I used SysInternals's program "DbgView" to check if the messages go there.
  • I started Pro from the command line. But no message appear there.
  • I got so desperate that I actually looked at the "Python Window" and the "Geoprocessing History". Of course with no success.

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.)

BrianWilson7
Occasional Contributor III

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.

RalfSchmidt
New Contributor III

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.

BrianWilson7
Occasional Contributor III

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. 

 

EStauber
New Contributor

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."} "

 https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-dictionary-k... 

0 Kudos
HildermesJoséMedeirosFilho
New Contributor
 
calcfield.jpg

I'd recommend the approach above. I do this using attribute rules, using Calculate Field-Arcade. (Don't  forget it, press Verify icon first)