Tuesday, February 22, 2011

Using Notepad++ to make Apex Test Runner Debug output readable

When running the Apex Test Runner in Eclipse with the Log level set to Debug it can be difficult to see your debug messages through the noise of method entry and method exit messages.


I've been copying the output into Notepad++ and then using the RegExs ^.+METHOD_.+$ and ^.+CONSTRUCTOR_.+$ followed by[ TextFX > TextFX Edit > Delete Blank Lines] to clean up the output.

With v5.8.7 I was able to combine all this into a Macro.

Visual Studio 2010

Better yet, copy it into a Visual Studio 2010 txt file and add a \n to the end of each regex.


Another good option is to adjust the amount of logging that occurs in the first place. See Setting Debug Log Filters

System Log | Force.com Console | Developer Console

The online logging has come a long way since this was first posted. Assuming the log isn't too big you can now Filter the execution log directly online.

See also: