Wiki articles tagged with "debug"

Showing 1-5 of 5 items.

How to redirect all emails to one inbox on Yii2 applications

Created 2 years ago by Gabriel A. López López.

\yii\mail\BaseMailer::useFileTransport is a great tool. If you activate it, all emails sent trough this mailer will be saved (by default) on @runtime/mail instead of being sent, allowing the devs to inspect thre result.

6 0
Viewed: 55 885 times
Version: 2.0
Category: How-tos

Debuging variables in Yii2

Created 8 years ago by johonunu, updated 8 years ago by johonunu.

This tutorial is explained following "basic" application structure.

4 1
Viewed: 39 613 times
Version: 2.0
Category: Tips

Debugging CActiveRecord failed save() attempts

Created 10 years ago by Boaz, updated 9 years ago by Boaz.

When you're filling up a form of a CActiveRecord (using CActiveForm for example), usually you'll construct your code so that in case of validation error you'll get back the form with the error displayed back to you, typically when CActiveForm.errorSummary() is used. This is how its done by Gii.

4 0
Viewed: 37 849 times
Version: 1.1
Category: Tips

Access log output from unit tests

Created 10 years ago by Mike, updated 10 years ago by Mike.

Say, you want to write a test for a component which provides a caching feature. How would you know, that some method of your component returns a cached result? With the solution described here you can inspect all log outputs. So you could search the logs for accesses to the DB to really make sure, that the result was served from cache.

3 0
Viewed: 14 502 times
Version: 1.1
Category: Tips

Real Time Logging

Created 12 years ago by lucifurious, updated 12 years ago by lucifurious.

I've seen a lot of people asking about the logging facilities in Yii and thought I'd share a nice little class I wrote that provides near real-time logging.

13 0
Viewed: 34 505 times
Version: 1.1
Category: Tips