Often happens that I debug a python application connecting to sqlite database and during debugging the connection is not closed.
When I debug it next time, the database is locked, so I can’t connect to it so I have to edit source code, close connection before the place where exception database is locked occur, comment the source code and continue debugging.
Is it possible to unlock the database faster? For example from command line?
thank you
The database is locked to other connections when a transaction is in progress. You can find documentation about SQLite locking here.
However you can still access the database via the connection that has locked it. You can stick that in a global variable or something similar while debugging.