• Stars
    star
    195
  • Rank 199,374 (Top 4 %)
  • Language
    PHP
  • License
    BSD 3-Clause "New...
  • Created about 11 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Debug Extension for Yii 2

Debug Extension for Yii 2


This extension provides a debugger for Yii framework 2.0 applications. When this extension is used, a debugger toolbar will appear at the bottom of every page. The extension also provides a set of standalone pages to display more detailed debug information.

For license information check the LICENSE-file.

Documentation is at docs/guide/README.md.

Latest Stable Version Total Downloads Build Status

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yiisoft/yii2-debug

or add

"yiisoft/yii2-debug": "~2.1.0"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply modify your application configuration as follows:

return [
    'bootstrap' => ['debug'],
    'modules' => [
        'debug' => [
            'class' => 'yii\debug\Module',
            // uncomment and adjust the following to add your IP if you are not connecting from localhost.
            //'allowedIPs' => ['127.0.0.1', '::1'],
        ],
        // ...
    ],
    ...
];

You will see a debugger toolbar showing at the bottom of every page of your application. You can click on the toolbar to see more detailed debug information.

Open Files in IDE

You can create a link to open files in your favorite IDE with this configuration:

return [
    'bootstrap' => ['debug'],
    'modules' => [
        'debug' => [
            'class' => 'yii\debug\Module',
            'traceLine' => '<a href="phpstorm://open?url={file}&line={line}">{file}:{line}</a>',
            // uncomment and adjust the following to add your IP if you are not connecting from localhost.
            //'allowedIPs' => ['127.0.0.1', '::1'],
        ],
        // ...
    ],
    ...
];

You must make some changes to your OS. See these examples:

Virtualized or dockerized

If your application is run under a virtualized or dockerized environment, it is often the case that the application's base path is different inside of the virtual machine or container than on your host machine. For the links work in those situations, you can configure tracePathMappings like this (change the path to your app):

'tracePathMappings' => [
    '/app' => '/path/to/your/app',
],

Or you can create a callback for traceLine for even more control:

'traceLine' => function($options, $panel) {
    $filePath = $options['file'];
    if (StringHelper::startsWith($filePath, Yii::$app->basePath)) {
        $filePath = '/path/to/your/app' . substr($filePath, strlen(Yii::$app->basePath));
    }
    return strtr('<a href="ide://open?url=file://{file}&line={line}">{text}</a>', ['{file}' => $filePath]);
},

More Repositories

1

yii2

Yii 2: The Fast, Secure and Professional PHP Framework
PHP
14,127
star
2

yii

Yii PHP Framework 1.1.x
PHP
4,851
star
3

yii2-app-advanced

Yii 2.0 Advanced Application Template
PHP
1,628
star
4

yii2-queue

Yii2 Queue Extension. Supports DB, Redis, RabbitMQ, Beanstalk and Gearman
PHP
1,068
star
5

yii2-app-basic

Yii 2.0 Basic Application Template
PHP
630
star
6

yii2-authclient

Yii 2 authclient extension.
PHP
455
star
7

yii2-redis

Yii 2 Redis extension.
PHP
444
star
8

yii-core

Yii Framework 3.0 core
433
star
9

yii2-elasticsearch

Yii 2 Elasticsearch extension
PHP
427
star
10

yii2-httpclient

Yii 2 HTTP client
PHP
422
star
11

yii2-docker

Official Docker images suitable for Yii 2.0
PHP
363
star
12

yii2-mongodb

Yii 2 MongoDB extension
PHP
318
star
13

demo

Yii 3 demo application
PHP
314
star
14

yii2-imagine

Yii 2 imagine extension
PHP
282
star
15

yii2-apidoc

Yii 2 apidoc extension.
PHP
254
star
16

yii2-framework

[READ ONLY] Yii 2 framework core code only. This is a subtree split off the "yii2" repository
PHP
232
star
17

docs

Various Yii 3.0 related documentation
232
star
18

app

Yii3 application template
PHP
228
star
19

yii2-bootstrap4

Yii 2 Bootstrap 4 Extension
PHP
210
star
20

yii2-gii

Yii 2 Gii Extension
PHP
198
star
21

yii2-bootstrap

Yii 2 Bootstrap 3 Extension
PHP
183
star
22

yii2-coding-standards

Yii 2 coding standards
PHP
179
star
23

yii2-sphinx

Yii 2 Sphinx extension.
PHP
179
star
24

di

PSR-11 compatible DI container and injector
PHP
168
star
25

yii2-shell

Interactive shell
PHP
137
star
26

yii2-twig

Yii 2 Twig extension.
PHP
136
star
27

yii2-jui

Yii 2 JQuery UI extension.
PHP
125
star
28

db

Yii Database Library
PHP
123
star
29

yii-project-template

PHP
120
star
30

yii2-swiftmailer

Yii 2 swiftmailer extension.
PHP
114
star
31

validator

Yii validator library
PHP
112
star
32

yii2-faker

Yii 2 Faker extension
PHP
104
star
33

yii-base-web

PHP
101
star
34

yii-api

Yii REST API framework
PHP
92
star
35

yii2-composer

Yii 2 composer extension
PHP
81
star
36

yii-web

Yii web components
PHP
78
star
37

yii2-smarty

Yii 2 Smarty Extension.
PHP
72
star
38

active-record

Active Record database abstraction layer
PHP
68
star
39

yii-dev-tool

Development environment for Yii 3 packages
PHP
68
star
40

event-dispatcher

PSR-14 event dispatcher
PHP
67
star
41

app-api

API application project template
PHP
65
star
42

yii-console

Yii console components
PHP
62
star
43

yii2-collection

Collection extension for Yii 2
PHP
62
star
44

yii-bootstrap5

Yii Framework Bootstrap 5 support
PHP
60
star
45

router

Router is a request matcher and URL generator
PHP
59
star
46

rbac

Role based access control
PHP
59
star
47

yii2-bootstrap5

Yii 2 Bootstrap 5 Extension
PHP
58
star
48

view

Yii view rendering library
PHP
57
star
49

html

Handy library to generate HTML
PHP
55
star
50

queue

Queue extension for Yii 3.0
PHP
55
star
51

yii2-codeception

Yii 2 Codeception extension (DEPRECATED)
PHP
54
star
52

arrays

Yii Array Helper
PHP
52
star
53

yii-base-api

REST API application template
PHP
52
star
54

friendly-exception

An interface for an exception to be friendly
PHP
48
star
55

strings

String helper methods and an inflector
PHP
47
star
56

data

Data providers
PHP
44
star
57

yii-cycle

Cycle ORM support for Yii
PHP
44
star
58

injector

PSR-11 compatible injector
PHP
43
star
59

security

A set of classes to handle common security-related tasks
PHP
43
star
60

form

The package helps with implementing data entry forms
PHP
43
star
61

yii2-symfonymailer

Yii 2 Symfony mailer extension.
PHP
42
star
62

yii-docker

Official Docker images suitable for Yii 3.0+
PHP
42
star
63

router-fastroute

Yii Router FastRoute adapter
PHP
39
star
64

yii-dataview

Data widgets
PHP
39
star
65

yii-masked-input

Yii Framework Masked input widget Extension
PHP
38
star
66

db-mysql

MySQL and MariaDB driver for Yii Database
PHP
37
star
67

log

PSR-3 compatible logger
PHP
35
star
68

package-template

A template for a new package within yiisoft
PHP
34
star
69

factory

Object factory that is able to resolve dependencies from PSR-11 container
PHP
34
star
70

auth-jwt

PHP
34
star
71

auth

PHP
34
star
72

files

Useful methods to manage files and directories
PHP
33
star
73

yii-gii

Yii code generator extension
PHP
33
star
74

mutex

Mutex lock implementation
PHP
32
star
75

composer-config-plugin

Composer plugin for config assembling
PHP
31
star
76

yii-debug

Yii debug panel extension
PHP
31
star
77

yii-runner-roadrunner

Web application runner for RoadRunner
PHP
31
star
78

access

Access checking abstraction
PHP
31
star
79

config

Configuration management
PHP
31
star
80

cache

PSR-16 compatible cache library
PHP
31
star
81

yii-swagger

Swagger integration for Yii
PHP
30
star
82

db-pgsql

PostgreSQL driver for Yii Database
PHP
30
star
83

db-migration

The package implementing migration for yiisoft/db.
PHP
29
star
84

db-sqlite

SQLite driver for Yii Database
PHP
28
star
85

demo-api

PHP
28
star
86

rate-limiter

RateLimiter helps to prevent abuse by limiting the number of requests that could be me made consequentially.
PHP
28
star
87

json

JSON encoding and decoding
PHP
26
star
88

network-utilities

Network related utilities
PHP
26
star
89

yii-jquery

Yii Framework jQuery Extension
JavaScript
26
star
90

http

Handy HTTP utility such as method constants and status codes
PHP
26
star
91

yii-base-cli

Yii Framework Command Line Application
PHP
26
star
92

view-twig

Yii View Twig Renderer
PHP
25
star
93

db-oracle

Oracle driver for Yii Database
PHP
25
star
94

yii-bulma

Yii Framework Bulma Integration
PHP
25
star
95

widget

Widgets are reusable building blocks used to create complex and configurable user interface elements in an object-oriented fashion
PHP
25
star
96

aliases

Named paths and URLs storage
PHP
24
star
97

i18n

Yii i18n
PHP
24
star
98

csrf

PSR-15 middleware implementing CSRF protection
PHP
23
star
99

yii-auth-client

Yii Framework external authentication via OAuth and OpenID Extension
PHP
23
star
100

translator

Message translation
PHP
23
star