SQLite Forum

Any shell command to show executed SQL for debugging?
Login

Any shell command to show executed SQL for debugging?

(1) By anonymous on 2020-08-24 15:49:32 [link] [source]

For debugging purposes...

Inside an SQL script, instead of doing:

.print pragma foreign_keys = ON;
pragma foreign_keys = ON;

.print select * from t;
select * from t;

for every single SQL command to know which command produced which result, is there some SQLite3 shell dot command or pragma that will have the same effect but without me having to explicitly use .print all over.

I'm thinking something like how .eqp on automatically shows the query plan before the result of each SQL command, but instead to show the actual SQL command about to execute.

(2) By Richard Hipp (drh) on 2020-08-24 15:54:58 in reply to 1 [link] [source]

   .echo on

(3) By anonymous on 2020-08-24 15:59:03 in reply to 2 [source]

That simple? THANKS!