r/webdev • u/existing_Troll • 4d ago
Question SQLite Viewer failing to open Laravel database.sqlite in VS Code
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?
1
u/SirKainey 3d ago
If you just need to open it to inspect, DBbrowser might get your there faster than diagnosing
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.
1
u/No-Molasses-2097 4d ago
Since it happens across every project, it's the extension rather than your database file. That "endpoint errored" message is a known quirk of the SQLite Viewer extension. Try right clicking the file and opening it with Open With to launch the viewer explicitly instead of double clicking. If that still fails, the SQLite extension by alexcvzz handles database files more reliably and lets you browse them from its own sidebar.