Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Dump and Die" - debugging #1066

Open
Cristianpl4y opened this issue Nov 1, 2022 · 2 comments
Open

"Dump and Die" - debugging #1066

Cristianpl4y opened this issue Nov 1, 2022 · 2 comments

Comments

@Cristianpl4y
Copy link

Hello, I just found out that one of the systems where I work uses medoo, searching the documentation I didn't find a method that makes it easy to view variables in the browser.

Not that this is a problem because we can use
var_dump() and print_r().

Would it be possible to create an easy native method?

Example:
Laravel has a specific short helper function to show variables - ​dd()

similar to debug(), but instead of displaying the SQL, it retrieves the contents of the query.

@catfan
Copy link
Owner

catfan commented Nov 2, 2022

We have debug() for a query, beginDebug() and bebugLog() for debug logging.

And logging connection option for log() to log all queries.

And testMode for testing queries.

https://medoo.in/api/new
https://medoo.in/api/log
https://medoo.in/api/debug

@Cristianpl4y
Copy link
Author

Temos debug()para uma consulta beginDebug()e bebugLog()para log de depuração.

E opção de conexão log()de registro para registrar todas as consultas.

E testMode para testar consultas.

https://medoo.in/api/new https://medoo.in/api/log https://medoo.in/api/debug

They are great resources 😅, I think you didn't understand my suggestion very well 😕, I missed a method that shows the data returned from the queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants