Category "yii2"

Yii2: How do I debug console commands?

The Yii2 debugger seems to only work for web requests. How can I debug console commands (CLI)? Eg. I need to see the SQL statements that were executed during a

yii2 register js code in a view

What is the best way to register js code in yii2 view? 1 <?php $this->registerJs( '$("document").ready(function(){ alert("hi"); });' ); ?&