This is NOT a post where I will tell you there are ‘good’ and ‘bad’ extensions for VS Code. I am here to say that there might be some extensions out there that can cause conflicts, thereby making our SQL Developer features…inaccessible.

I’m still learning the in’s and out’s of VS Code, but one of the core concepts or features you’re going to want to get familiar with are Workspaces. But, more on this later.

Problem: Why can’t I execute my .SQL files?

I’ve gotten this question a few times, and my answer is, well of course you can! Simply pick your connection and hit the ‘Run’ button(s)!

Like so –

Easy peasy, chicken squeezy.

But…this might not be working for you, because you’re working with a file you’ve already attached to a project/directory that’s got another extension active.

And so when you look down in status bar or up at the toolbars, you don’t see anything like what you’re expecting.

Another extension is active…

So the obvious question, how can I get the stuff, features, etc from the SQL Developer Extension for VS Code to work, even if I have other extensions for database and SQL stuff installed?

Let’s go over a few options!

How to fix #1: Switch the active extension for your file

You need to switch the file to our extension, like so –

I had to do some futzing around to get all my worksheet buttons back, even after switching…

How to fix #2: Disable the conflicting extension

This isn’t quite the nuclear option, i.e. an UNINSTALL. And perhaps you quite like the SQL Server extension you’re using, when you’re doing MSFT work. But when you’re doing Oracle stuff, you want the Oracle features, even if both share the same file extensions like .SQL!

You don’t have to disable the extension, globally!

Ok so disable the extension, but then I can’t use it? That doesn’t sound like a fix???

One way to ‘have and eat our cake’ is to create a new VS Code Workspace (VS Code Docs). Instead of opening a ‘file,’ you open a ‘Folder.’ Opening a folder gives you a new workspace. So for example, I’m going to have a Workspace for my Oracle project files,

Then you can disable the conflicting extension(s) for only that workspace.

Once the workspace/directory have been set, when you save/create/open files in that folder, they’ll adopt the features/extensions you’ve enabled for that workspace, which is all of them, by default.

You can disable an extension completely, or just for the current/active Workspace, and of course the converse of Enabling said extension also applies.

This should fix your conflict(s).

How to fix #3: the Nuclear option, UNINSTALL

I’m not recommending this, but obviously if you do that, it’ll remove any conflicts said extension may have been causing.

If you’ve stopped using an extension completely, you probably should uninstall it. It’ll take less space on your machine and if there’s ever a security concern with a library or package it might be using, you don’t have to worry about your machine popping up on a security scan by your company’s IT/security department.

Author

I'm a Distinguished Product Manager at Oracle. My mission is to help you and your company be more efficient with our database tools.

9 Comments

  1. Instead of disabling extension in the workspace I created different profiles where you can activate/deactivate needed/not needed extension.

    A profile is connected to a workspace, but you can switch between the profiles without switching/changing the workspace.

  2. I have “resultSet for PAKCAGE is undefined” message when trying drop down Package branch. Everything else: tables, functions work fine.

    • Hey Jeff – is this fixed ? I updated the vscode extension, but still face the issue.
      Thanks,
      SKN

  3. My extension is not working because the Connection mechanism creates randomly named folders which are inaccessible by my current user, which strangely enough is running vscode at that moment…
    It was first preventing the loading of the entire extension, but I could add my user to that folder to fix it. But that doesn’t work when creating the connection, because that folder is created and named randomly everytime I click on connect.

    • The name of the directory isn’t important, what’s important is an extension bug or ours that isn’t handling domain vs local users on your machine.

      Our bug fixes drop next week 🤞 will sort this.

  4. Can do it from command line also.

    #code –list-extensions
    deltaxml.xslt-xpath
    ms-python.debugpy
    ms-python.python
    ms-python.vscode-pylance
    oracle.sql-developer
    rangav.vscode-thunder-client
    redhat.java
    visualstudioexptteam.intellicode-api-usage-examples
    visualstudioexptteam.vscodeintellicode
    vscjava.vscode-java-debug
    vscjava.vscode-java-dependency
    vscjava.vscode-java-pack
    vscjava.vscode-java-test
    vscjava.vscode-maven

    # code –disable-extension vscjava.vscode-java-debug –disable-extension ms-python.python .

Write A Comment