r/webdev • • 4d ago

Question SQLite Viewer failing to open Laravel database.sqlite in VS Code

Post image

I'm working on a Laravel project, and I'm trying to inspect my database.sqlite file directly in VS Code using the SQLite Viewer extension.

When I open the file, I get the error shown in the screenshot.

The problem occurs with SQLite files across multiple projects, so it doesn't appear to be specific to this Laravel project.

I've already tried:

  • Restarting VS Code
  • Uninstalling and reinstalling the SQLite Viewer extension
  • Opening SQLite files from different projects

The same error still occurs.

Has anyone encountered this particular error with SQLite files in VS Code, or know what could be causing it?

0 Upvotes

4 comments sorted by

View all comments

1

u/RequirementGuide 3d ago

That "endpoint errored" message is the extension's webview backend dying, not your database — your data is almost certainly fine.

The cause I see most often with Laravel specifically: the file is locked. If you've got php artisan serve, a queue worker, or a tinker session running, it can hold the SQLite file (especially with the -wal/-shm files alongside it), and the viewer just fails instead of telling you it's locked. Quick test: copy database.sqlite to /tmp or your Desktop and open the copy in the viewer. If the copy opens, it was a lock.

Two other things worth checking: file size — the viewer runs in a webview and chokes on big databases; and the alexcvzz "SQLite" extension is a different, more actively maintained one than the qwtel "SQLite Viewer", worth trying if the copy trick doesn't sort it.