Debugging seems to be potentially hair-raising with Webwork. I sometimes can't be sure whether the problem is at the Perl, Webwork, or even Apache level. That saving grace of most programmers, the print statement, is awkward or even impossible with webwork: if the problem fails to load nothing will printed at all. I just did a google search on "webwork error_log", hoping to find a way to write to the Apache log, but came up empty.
My current favorite technique is to stick this in:
GR_isHamiltonianCircuit_graph_vertices( $graph, ) \}
$BR $BR $BR
That gives me a nice view of an expression that might be causing trouble.
What your favorites?