Dev tool for swoft
- composer command
composer require swoft/devtool
- Add http middleware in
config/beans/base.php
'serverDispatcher' => [
'middlewares' => [
// ...
\Swoft\Devtool\Middleware\DevToolMiddleware::class,
]
],
- Some optional config for devtool(in
config/properties/app.php
).
'devtool' => [
'enable' => true,
'logEventToConsole' => true,
'logHttpRequestToConsole' => true,
],
- Publish static assets to
public
dir.
php bin/swoft dev:publish swoft/devtool
// -f will delete old assets.
php bin/swoft dev:publish swoft/devtool -f
-
Now, you can access
HOST:PORT/__devtool
by browser. e.ghttp://127.0.0.1:9088/__devtool
-
If you see the following screen, you have successfully installed
If you cannot access the address HOST:PORT/__devtool
- Ensure your static assets is can accessed and assets is publish successful.
- Ensure that the server was restarted after updating the package
Opening devTool will have some impact on server operation, please turn it off during stress test.
Please see document site
phpunit
The Component is open-sourced software licensed under the Apache license.