Debugging T-SQL in VS Code - tsql

I'm exploring VS Code. I would like to debug a stored procedure but when I search extensions for '#category:debuggers SQL' there are no results. I 'Started Debugging' and clicked 'Find SQL Extension' and again no results. The Debug Console is blank/empty. Is it possible to debug SQL in VS Code? I'm familiar with this post but it's many years old so asking again.
SQL debug in vs code
enter image description here

Related

SQL auto-indentation in VS Code

I am learning SQL (PostgreSQL). As the code gets longer and more complicated, it gets harder to review in PGadmin visually. Is there any way to auto-indent in VS Code like in SQL Server
I have tried SQL formatter extension from VS Code marketplace. It indents the codes. But in 'C' style. When I have 3 or 4 subqueries, it isn't easy to keep track of the indention
Just go to your vscode extension marketplace and search for SQL code formatter. I found one by just searching on google real quick. SQL Formatter

DB2: Procedures comments are not deployed via Data Studio

I create a new stored procedure including comments
etc. /* this is a comment */. But if i have a look at the source tab of this procedure in data studio this line is gone.
What's going wrong here?
kind regards
Ralf
You can also consider using -- to show comments instead of /* */
The command line (CLP) preserves comments by default with current Db2 versions, i.e. you don't have to use Data Studio for deployment activities.
In Data-Studio, remember to tick the 'Deploy Option' "Deploy source to the database", as by default it is not ticked. In my 4.1.3 version of Data Studio, this preserves comments in SQL procedures.
Losing comments was reported in an old version of Data Studio with a workaround.
The workaround for the issue is to use the Routines Editor to create the stored procedure, then select the DEPLOY button. That will preserve comments.
Data Project Explorer
Right click on Stored Procedures
Select New->Stored Procedure
Select any of the templates and click Finish
Edit the generated coded and press the DEPLOY button, top right.
If you still have a problem and if your company has an IBM support contract then open a ticket with IBM to get it resolved.

Visual Studio Code: where does MS WScript IntelliSense support come from?

I've been working on some scripts for Windows using Visual Studio Code and was surprised that when I type WScript on a line the IntelliSense pops up the correct code completion information, even on my Mac.
I've read the documentation on the VSC website and suspect its either coming out of the built-in JavaScript support or Automatic Type Acquisition from some included library but really would like to find out exactly where this is coming from. So far either my Google-Fu is or nobody has written a thing about it because I can't find any information anywhere. Can anyone answer this one?
It's built into TypeScript. In VSCode, it's actually easy to find the source because you can press F12 on the definition in code, and it will show you the .d.ts:

Force Visual Studio Code to highlight part of the code in different language

I'm writing SQL code in a .php file. Can I set a hint/comment for Visual Studio Code to highlight that part of the code in SQL syntax?
It seems like you can't do it. Here's an opened issue Universal Language Injections #1751.

How to setup Julia in VS code?

I'm coming from a pure Windows Visual Studio programming background with little Linux experience. It seems possible to use VS Code to program in Julia, but I can't figure out how to get things set up correctly.
Does anybody have good example launch.json, tasks.json, or other files that can serve as an example to build from?
This would be a great thing to see in a detailed tutorial.
Here is how things work if you are using the Julia extension for VisualStudio Code.
The extension adds a bunch of new commands. They all start with "julia", so filtering by that string should show you everything you can do with the extension.
In terms of running Julia code, the extension offers only two options right now. First, you can execute a command to start a REPL. This will just show a default Julia prompt, and you can interact with it like you would with any other Julia REPL. The second is that there is also a command, triggered by Ctrl + Enter, to send either the current editor selection or the current editor line to this REPL.
There is currently no further integration offered by the Julia extension. We do plan to add debugger support in the future, at which point I would expect F5 to start the current file in the debugger, or something like that. But that functionality is probably a couple of months away.