Welcome Guest, Not a member yet? Register   Sign In
how to debug with CI - very newb question
#1

[eluser]jorre[/eluser]
I'm aware that this will be the most newb a question can be, but here it comes:

how can I debug my application?
I'm trying to write log_message('debug', 'Some variable was correctly set'); in my controller wherever I need to see if my code gets interpreted or not.

I don't get these messages on screen...

Is this the right way to debug? Or how do you all debug your applications?
#2

[eluser]Seppo[/eluser]
You should set up your "log_threshold" level to 2 or higher, and a log_path (by default it's in system/logs) and the message is written there.
#3

[eluser]jorre[/eluser]
thanks Seppo.

Is logging somewhere documented?
I get a "Directory access is forbidden." when accessing /system/logs
#4

[eluser]Seppo[/eluser]
You can't access it from http. You have to open it as a text file.
The logging is not much documented, or at least, I can't find it... The best I've founded is here
#5

[eluser]jorre[/eluser]
I found a much better way to debug over HERE: http://ellislab.com/forums/viewthread/71073/#352851

Exactely what I needed!




Theme © iAndrew 2016 - Forum software by © MyBB