"Add Database Source to Workspace" does not preserve loaded database
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript, vscode
- Domain
- developer-experience, devtools
Research direction
Reproduce the issue using the “Add Database Source to Workspace” action with a folder-based CodeQL database, then trace what is persisted across the VS Code workspace reload. Compare the database list before and after reopening the workspace. Done means the previously loaded database remains listed and can be used by the AST viewer without manual re-adding.
Written by the indexing model from the issue text.
Description
Describe the bug
When using the "Add Database Source to Workspace" action and the current folder is re-opened as VS Code workspace, the opened database is not preserved; the list of databases is empty afterwards.
Version
Extension:
CodeQL extension version: 1.17.7
CodeQL CLI version: 2.25.1
Platform: win32 x64
VS Code:
Version: 1.113.0 (user setup)
Commit: cfbea10c5ffb233ea9177d34726e6056e89913dc
Date: 2026-03-24T15:07:18+01:00
Electron: 39.8.3
ElectronBuildId: 13620978
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200
To reproduce
- Open a regular folder in VS Code
- Load a CodeQL database (folder-based)
- Right-click the database and select "Add Database Source to Workspace"
ℹ️ As expected: The VS Code window is reloaded as workspace
ℹ️ As expected: The database source was added
❌ Bug: The CodeQL database added in step 2 is not listed anymore as database, you have to manually re-add it
Expected behavior
After using "Add Database Source to Workspace" the database is still loaded
Additional context
The current behavior can be quite confusing. For example, I wanted to browse the AST of a database source file, so I loaded the database, selected "Add Database Source to Workspace", opened the source file and tried to open CodeQL's AST viewer. But it failed, saying that it could not find the database for the source.
Only then I noticed that the list of databases was empty (as mentioned in the description above).
- Dominant language
- TypeScript
- Stars
- 539
- Forks
- 240
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 29
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/vscode-codeql
-
bug VSCode
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/vscode-codeql#4471 · 1 comment ·
-
bug enhancement VSCode
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/vscode-codeql#592 · 2 comments ·
-
enhancement VSCode
Difficulty 3/5 1-2 days Newbie friendliness 55/100
github/vscode-codeql#4432 · 1 comment ·
-
bug VSCode
Difficulty 3/5 1-2 days Newbie friendliness 64/100
github/vscode-codeql#4339 · 1 comment ·
-
CLI test failure Opencli-test-failure
Difficulty 3/5 1-2 days Newbie friendliness 32/100
github/vscode-codeql#4330 · 4 comments ·
All issues in github/vscode-codeql
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·