This page was extracted from ExtremeProgrammingWithAtgDynamo cos the page was getting too big.
----
One of the most useful things you can do for developing in Dynamo is to '''sprinkle your code liberally with debugging statements''' -- anywhere you would usually put a comment or an assertion in fact. Because you can turn loggingDebug off and on dynamically, you can see exactly what your code is doing without impacting performance.
Set up eclipse templates to help you do this (StuartJones)
if(isLoggingDebug()) { logDebug("${enclosing_method}(${enclosing_method_arguments})"); } ${cursor}
You can also use logDebug in JHTML pages by saying
request.setLoggingDebug(true);
request.logDebug("This is at the start of the JHTML page");
This works well when you're trying to debug a single page.
----
'''To comment out code or text in Dynamo''', use the embedded Java comment
/* comment */
or the JSP comment
<%-- this is a comment --%>
Neither will show up in the page output.
Note that doing
// This is a comment
will break the page! This is because the interpolation is done without a newline, which means
the comment will probably be prepended to some working piece of code and all your _DARGS will magically stop working.
-----
'''To find the scope of a particular component''', use
.
This is because most components inherit from GenericService, which has a bean property of getServiceConfiguration, which has a Configuration interface which exposes many properties of the bean. Very useful when you just want to check out how something is configured.
-----
'''To find the class of a component or param''', use
----
CategoryTips