-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Failed to run query in vscode extension, but cli worked #18639
Unanswered
yuxiaolejs
asked this question in
Q&A
-
I ran into a strange situation where my vscode extension complains about the library path even after me running codeql pack install (which shows nothing to download), and refused to run any queries. However, if I run the same query on the same database using CLI command codeql query run --database=/codeql_create_db.database_dir alloc_const.ql, it will work properly and give the expected output. What might be wrong?
FYI this is how I configured codeql:
- Downloaded the
codeql-bundle-linux64.tar.gzarchive. - Unzipped the
codeqldirectory into/opt/codeql - Added
/opt/codeqlto my path (later for debugging I added it to the path of/etc/environment - Confirmed the
codeqlcommand is working.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Hi @yuxiaolejs,
It seems like the issue might be with the VSCode extension path or environment variables. Here are a few things to check:
- Make sure the VSCode CodeQL extension is pointing to the correct CodeQL path (/opt/codeql).
- Restart VSCode to ensure it picks up the correct environment variables.
- Double-check the database path in VSCode to make sure it's the same as the CLI.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment