function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Did SF change the way they used to log apex executiong

First, let me start by saying that I not using any managed packages in my code. 


Until very recently, when you execute code using Execute Anonymous or System Log, it used to show method entries, exits and when there is a exception, it used to tell you what the exception and the line number it happened.


I am trying to debug something using Execute Anonymous in eclipse, and I am seeing a lot of "ENTERING_MANAGED_PKG" lines and the log recahes it limit. I used to run this code the same way and see the whole log.


If I run the same code in SystemLog I see the enter log, but it doesn't help. Here is an example of what I see in System Log.


13:43:10.563 (9563923000)|VARIABLE_ASSIGNMENT|[261]|e|"common.apex.runtime.impl.ExecutionException: Attempt to de-reference a null object"|0x4dab7950

13:43:10.564 (9564116000)|VARIABLE_ASSIGNMENT|[-1]|value|"Attempt to de-refere (17 more) ..."
13:43:10.564 (9564131000)|VARIABLE_ASSIGNMENT|[11]|this.message|"Attempt to de-refere (17 more) ..."|0x41c0137b


Not sure how the hex decimal value is going to help me in debug. ;)


Someone else seeing the same behavior?


Try to set log category in which is more useful for you  and also log level bar in the execute anonymous window.


It looks like you trying to use a null variable. if your trigger or classs needs data from saleforce to run, you will need to add that to your Execute Anonymous code. try putting system.debug calls in front the variables its trying to call and display it in the log before the code uses it. you there is an error in you logic it will stop the Execute Anonymous. this can be hard to catch at first because you code my not have any errors in the syntex. 


Are you using the new System log or old one ?  I would say new log is very usefull.


You can select the particular log and download it and you will have all the debug log you want.