Hey Laravel Developers
While debugging any error in the application a common method is commenting out code temporarily to check the impact of the commented code, eg, whether a particular PHP method or file is causing some failure in the application.
If these methods or files are huge commenting out the entire code can be a bit more work especially when you are debugging on a server with access to different editors like Vim.
In those scenarios what we can do is instead of commenting on the code entirely we can just write a return statement at the beginning of the method or file.
This way it's just easy to debug and revert back to the original version faster.
What do you think about this method? What strategies do you use in such kinds of scenarios?
Back