How to see a SQLite database content with Visual Studio Code

92,212

Solution 1

I published an extension to query and explore sqlite3 databases

vscode-sqlite

Solution 2

  1. Just install the sqlite extension in your visual studio code: VSCode-SQLite
  2. Then you can right-click on the database file and click "Open Database". SQLite database in visual studio code
  3. Expand the database. expanded sqlite database in vscode
  4. Click the play button in front of each table to view table contents. SQLite table in visual studio code

Solution 3

For anyone that is still confused..

Follow the first 3 steps in Puya's answer, and at the very bottom of the Explorer panel there should be a tab called: > SQLITE EXPLORER (mine was minimised, even after clicking 'Open Database' - making it hard to notice)

In here, you should be able to see the contents of your database file. You can then right click a table and 'Show Table':

enter image description here

Solution 4

Obviously, there is not yet a corresponding extension for vscode. Me, if necessary, I use "SQLite-Database-Browser". Very simple and sufficient for my purposes.

If you want to give it a try: SQLite-Database-Browser

By the way, using Django with another database, such as PostgreSQL or MySQL, is not too difficult.

Share:
92,212
DEADBEEF
Author by

DEADBEEF

DSP & Software engineer, signal/audio processing lover with a French accent who codes faster than Einstein!

Updated on July 09, 2022

Comments

  • DEADBEEF
    DEADBEEF almost 2 years

    I'm new to Django and try to see a SQLite3 file. I'm looking for a way to open and view a database content with visual studio code like Pycharm can do (see picture) Database content view in Pycharm

    Does an extension could do that? Is it possible to achieve this in VSC?

  • DEADBEEF
    DEADBEEF about 6 years
    Thanks for sharing "SQLite-Database-Browser". I use it too and it's very convenient and useful. But I was looking for something embedded inside vsc. Anyway I will wait for it. It could happen soon maybe.
  • Diego
    Diego over 4 years
    I downloaded your extension, but nothing seems to happen when I try to open the database. I am new to this and created a toy database with db browser, but I haven't been able to create a "connection profile" as required by visual studio code. Could this be the problem as to why I am not able to run your extension?
  • MJimitater
    MJimitater about 4 years
    Thanks for your Extension @Alex Covizzi ! I installed it, but if I open a very simple SQLite database, it just says The file is not displayed in the editor because it is either binary or uses an unsupported text encoding. Do you want to open it anyway?. This is weird, I used to open sqlite3 db quite easily within vsc with an older version of vsc, even without any extension. But since I reinstalled, its somehow not allowing me to open databases, with or without extension. Do you have an idea?
  • Alex Covizzi
    Alex Covizzi about 4 years
    @MJimitater You probably already figured it out, but to open the database you need to Right Click > Open Database.
  • MJimitater
    MJimitater about 4 years
    @AlexCovizzi thank you. Well, if I do that, then I run into the message I wrote above.. really don't know how to open the database
  • Bruce
    Bruce almost 4 years
    On my version the play button is to the right of each table and can be seen only if the table is highlighted/selected or hovered over. Otherwise good summary, as it was not obvious how to use this.
  • gunardilin
    gunardilin about 3 years
    @Puya Fazlali thank you, your screenshots are helpful.
  • wildernessfamily
    wildernessfamily about 3 years
    Thanks for that explanation! I was looking all over for it. Right in front of my face but it's so far down in the explorer it's hard to see. I almost removed it. From reading reviews others are having a problem finding it. Look to the far left of your VSCose at the bottom. Just to the right of the gear icon.
  • MZB
    MZB almost 3 years
    And if you accidentally hide the view (like me), scroll down the View / Open View... menu dialog until you find SQLite Explorer view...
  • Benyamin Jafari - aGn
    Benyamin Jafari - aGn about 2 years
    I also needed this installation: sudo apt install sqlite