Block-level enable and disable debug

with_debug  true_or_false (boolean)

Similar to use_debug except only applies to code within supplied do/end block. Previous debug value is restored after block.

Introduced in v2.0

Example

# Example 1


use_debug true
play 80
with_debug false do
 
  play 50
  sleep 1
  play 72
end

play 90



# Turn on debugging:
 
# Debug message is sent
 
#Debug is now disabled
# Debug message is not sent
 
# Debug message is not sent
 
# Debug is re-enabled
# Debug message is sent