Our extension’s latest update (24.3) was released yesterday! If your VS Code hasn’t already updated the SQL Developer extension, now’s the time 🙂
📣 The BIG feature for 24.3 was our PL/SQL Debugger.
📣 Read the full changelog.
But there were several other nice updates and features, including:
Formatter Preferences
Most of the basic formatter preferences were moved over from classic SQL Dev to the extension. We have more of those coming soon.
For now you can see these in VS Code’s Settings. Just navigate to the Extensions section, and then to the SQL Developer area. You can use the File menu to get to the preferences/settings. or use the command palette.
So let’s take this block of code, and see what happens when we play with UPPER keywords, leading vs appending commas, and the indentation/spacing.
begin
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
host => '192.168.1.191',
lower_port=> 4000,
upper_port=> 4999,
ace => xs$ace_type(privilege_list => xs$name_list('jdwp'),
principal_name => 'HR',
principal_type => xs_acl.ptype_db));
end;
/
Drag a SQL worksheet over to the right, till it docks. Then you can see your formatter preferences side-by-side with your code.
Makes some changes, and format your doc. No need to hit ‘save’ or ‘apply’ – VS Code settings are applied IMMEDIATELY.
Demo (click on the image to go fullscreen)
Note in the context menu of your editor you have both:
- Format Document
- Format Selection
The format selection support was also introduced in 24.3. So now we can format some or all of our code.
Task Manager
With the ability to have multiple SQL Worksheets going with multiple connections doing multiple things, it begs the question: Where can we go to see what’s happening, or cancel stuff?
As you start running things, things that take more than a second or 3 to finish, you’ll see these items popping up on a new tab in your output panel, ‘Task Monitor.’
Note these will appear ONLY as they’re running. When they’re done, they go, bye-bye.
And if you want to stop waiting…simply right-click and ‘Cancel.’
9 Comments
I have installed version 24.3.0 of this plugin, but I am unable to find the Format settings. Looking at your screenshot as a reference, under “Telemetry” I have SQL Worksheet. Any ideas on how to fix this?
Show me.
You should just be able to search for Format.
Hi Jeff, any plans to add plsql wrapping into SQL Dev for VSCode? Would be nice to be able to easily wrap a file in VSCode….
To be fair/upfront that is NOT on the list, yet. It wasn’t part of SQL Developer, and never reached critical mass to add it there. That’s serving as the biggest decider in terms of features to add to VS Code and what rate/order to do so.
So for example, much higher on the list would be to add a visual guided way to import data to a new/existing table.
Or for PL/SQL, having our existing code refactoring and/or sql injection detections features implemented.
Hi Jeff,
I would like to ask for a simple feature which would solve a huge day to day problem for us, i.e. feature to copy multiple columns and rows from the Query Result grid. This feature is already present in the old SQL Developer, however in the VS Code extension only one cell at a time can be copied.
In our day to day life we often have to quickly run some queries and copy paste the result to some other application, this is a pain as of now in the VS Code extension as it only allows one cell to be copied. It is not always the best approach to export the result to a file and then share the file. I have also noticed while exporting results from the Query Result, sometimes only the query is exported or some old query result is exported.
It will be a great help if the feature to allow copy of multiple columns and rows (multi cell) can be added as part of an upcoming minor release. This will really help in day to day life as a dev.
Thanks in advance.
Abhishek Mitra
Yes I know, you’re not alone. It’s gonna get done. Stay tuned.
Hi Jeff,
Thanks for the great work on the SQL Developer extension for VS Code.
I believe you already have your backlog for the features to add, but could I ask or request the following features which I use most of the time on older SQL Developer application.
1. Pin the query results.
2. Schema browser for an opened db connection.
3. Folder and color based arrangements for database connections.
4. Color boundaries on a worksheet to identify the current connection which helps me to avoid mistakes.
5. Show/Hide some db object types from the object tree menu on the left hand side.
6. Sessions management
Other than those above, I like a very good feature on Allround Automations PLSQL Developer which is Test Window. It allows me to debug a PLSQL anonymous block without a need to ask the DBA to grant special privileges.
I know you recently added the PLSQL debugging feature to VS Code extension, but there is still a hassle to ask DBA for privileges which sometimes takes many days in a big organisations where DBAs are busy with other important stuff.
So I believe that implementation of Test Window feature by Allround Automations PLSQL Developer tool is really useful which could be brought over to the SQL Developer extension. Also you could try their code beautifier tool too on the application.
I hope you consider these suggestions.
Thanks,
Farhan
Hi Jeff, as far as the format settings go, I have a few questions:
– Will there be additional format settings available in future releases? For instance, I was looking for a setting that would left-align my SELECT statement rather than bumping out the FROM and WHERE keywords to align with the end of the SELECT keyword by the appropriate number of spaces.
– Perhaps this is above and beyond the scope of the SQL Developer VS Code extension, but will there be any integration with EditorConfig (https://editorconfig.org/)? It would be great if a developer could exhaustively specify all formatting rules, which VS Code would then (automatically) detect and use that when formatting the document. The EditorConfig setup is great because this can be distributed to any and all developers to promote a consistent code style. It can also be used in a CI/CD setup as well, so that commits are vetted. (I come from a .NET background and looking for ways to accomplish what I used to accomplish there but in the Oracle universe.)
The answer to your first question is in the post
“Most of the basic formatter preferences were moved over from classic SQL Dev to the extension. We have more of those coming soon”