How can I see the SQL generated by SQLite.NET PCL in Xamarin Studio?

I researched this and all I can find is a suggestion to turn on .Trace = true like this:

        db1 = DependencyService.Get<ISQLite>().GetConnection();
        db1.Trace = true;

I also tried this:

 db2.Trace = true;
 var categories = db2.Query<Category>("SELECT * FROM Category ORDER BY Name").ToList();
 Debug.WriteLine("xxxx");

Well I did this and then restarted the application. When I view the Application output I just see information on threads started and the xxxx but don't see any SQL trace information.

Can anyone give me advice on this. Thanks

Answers

  • dinobdinob USUniversity ✭✭✭

    While this works it does not really give much info in case of errors.

    For example, I have a try...catch which catches SQLIteException which says just "Constraint". While I know what Constraint is, I dont know where it is happening, why it is happening, and on which constraint.

    I was hopping enabling Tracer to trace will give more info but it gives none other than that it is executing some queries which I dont find very useful in this case

Sign In or Register to comment.