Turning on DBIC_TRACE from within the debugger

Thanks to castaway on irc I now know how to turn on DBIC_TRACE from within a debugger session to allow me to examine what’s going on with my DBIx::Class code.

$self->result_source->storage->debug(1) # if $self is a ResultSet
$schema->storage->debug(1) # essentially what you want to do

DBIC_TRACE=1 in front of a script run has always been useful (and the new addition of DBIC_TRACE_PROFILE=console makes it more useful) but being able to turn it off and on from within a debugger session is really handy.

 

About these ads
Tagged

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 58 other followers