Hi Esri community!
I have a question concerning the debugging of Attribute Rules in ArcGIS Pro 3.2. Various sources from Esri (documentation pages, community blogs and youtube video's) recommend writing variables and messages to the console using Console() when debugging your Arcade expressions. However, I can't seem to find the Console anywhere. Where are the messages sent to? How can I find the Console in ArcGIS Pro?
I have tried using the Arcade Playground to test parts of my code, but it can be difficult to replicate my data in there. Also, the Expression Builder has the 'Validate' button (green checkmark), which will output the result of the expression for one feature, including console messages. However, this is insufficient for proper debugging.
Your help is appreciated!
Solved! Go to Solution.
Hey @LucVanDijk
This link may help out, a solution states that it's not possible since ESRI didn't redirect the STDOUT to anywhere, but the solution underneath shows a way to perform this within a Calculate Field. I've used this before by creating a blank Feature Class with a few columns to create this test area, here is the link for that:
And here is a screenshot of my efforts here:
This has helped me debug a few non-calculate field related issues, and it may be strange but this seems to be the only way to do it that I can find!
Hope that helps!
Cody
Hey @LucVanDijk
This link may help out, a solution states that it's not possible since ESRI didn't redirect the STDOUT to anywhere, but the solution underneath shows a way to perform this within a Calculate Field. I've used this before by creating a blank Feature Class with a few columns to create this test area, here is the link for that:
And here is a screenshot of my efforts here:
This has helped me debug a few non-calculate field related issues, and it may be strange but this seems to be the only way to do it that I can find!
Hope that helps!
Cody
Thanks Cody. Too bad Esri hasn't worked this out yet. I suppose I could use this workaround until then. I will update this thread if I've found any better methods. 🙂
Console messages were added to the debug log in the ArcGIS Pro Diagnostics. I do not recall what version, might have been 3.2. I can see if I can find the version.
I have tried looking for the Console messages in the Diagnostic Monitor (Ctrl+Alt+M in ArcGIS Pro) after running the Evaluate Rules tool. With the Debug checkbox checked, the Log tab is populated with a bunch of information, but I was not able to find my Console messages in there. The Filter search box is not of much help, and I have trouble understanding the information in this window. See screenshot;
If you are using services, you need to check the ArcGIS Server log as the rules are run the GDB and arcgis pro does not have access to their execution.
To add to this thread, when using Console with attribute rules we write a debug entry in both server manager logs and ArcGIS Pro Monitor diagnostics. This helps tremendously in debugging. Here is a simple example
This was first introduced in Pro 3.2/11.2 and the fix has been ported to the following patches
- ArcGIS Pro 3.0.6
- ArcGIS Pro 3.1.3
- ArcGIS Pro 2.9.11
- ArcGIS Server 10.8.1 Utility Network and Data Management Patch 11
- ArcGIS Server 10.9.1 Utility Network and Data Management Patch 6
- ArcGIS Server 11.1 Utility Network and Data Management Patch 2