How to debug Sqlite Error

I am getting the following error using GRDB.swift package for a macOS target.
Code Block
2020-07-13 14:35:50.945023-0500 PayMe[2382:98653] [logging-persist] os_unix.c:44152: (0) open(/Users/bsoule/Desktop/TestGRDB.db3) - Undefined error: 0
Fatal error: 'try!' expression unexpectedly raised an error: SQLite error 14: unable to open database file: file /Users/bsoule/Documents/Xcode/PayMe/PayMe/AppDelegate.swift, line 21
2020-07-13 14:36:15.392148-0500 PayMe[2382:98653]
Fatal error: 'try!' expression unexpectedly raised an error: SQLite error 14: unable to open database file: fil

I have stepped through my program using debug/step into and can't see exactly where it is getting this error. Looking on the web it seems to be a general purpose error. Any ideas how to debug this error?
This post from 4 years ago describes what I seeing.

Sqlite and error 14

I have set the sandbox to the following:

File Access Type - User Selected File - Read/Write

Any ideas how to fix this? I am thinking this issue is because of sandbox restriction and the SQLite temporary files.


I see what I was doing wrong and took care of this issue. It was do to the location of the SQLite db so I moved inside the container for the app.
How to debug Sqlite Error
 
 
Q