简体   繁体   English

在Laravel的同一环境中通过URL更改调试模式

[英]Change Debug Mode via URL in one and the same environment in Laravel

I am using Larvel 4 and have set up diferent environments. 我正在使用Larvel 4,并设置了不同的环境。 Onw for my local developement and one for the live server. Onw用于我的本地开发,一个用于实时服务器。 But sometimes something works in my dev env. 但是有时候在我的开发环境中有些工作。 but not on the live server. 但不在实时服务器上。 So I wish I would be able to enable Debug mode on the live server without having to change the config file. 因此,我希望能够在实时服务器上启用调试模式,而不必更改配置文件。

I imagine something like adding ?dev=true to the URL. 我想像是将?dev = true添加到URL。

Is there something built-in or would I have to develope it on my own? 是否有内置的东西,还是我必须自行开发?

Thanks! 谢谢!

One solution is to use the log file to view any errors: app/storage/logs/laravel.log . 一种解决方案是使用日志文件查看任何错误: app/storage/logs/laravel.log

There, you can find the same info as you would on the "Whoops" screen--albeit much in a less elegant presentation. 在此处,您可以找到与“ Whoops”屏幕上相同的信息-尽管在不太优雅的演示中有很多信息。

For a long-term solution, I'd encourage setting up a staging environment as George suggested. 对于长期解决方案,我鼓励像George建议的那样建立一个临时环境。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM