How can I set non-persistent debugging parameters in Visual Studio Code? - visual-studio-code

I'm using Visual Studio Code to do some Python debugging. When debugging, I want to specify some temporary arguments to use. These are mostly just dummy values, since its for a test. I do not want the arguments checked into version control.
At the moment I'm modifying the launch.json file to add the args. However, this gets checked into version control. How can I specify arguments without adding to this file?
Normal Visual Studio IDE creates a temporary file for debug settings that doesn't get checked in. I was hoping for something similar to that for VSCode.

Related

How do I set a environment variables in VS Code?

I need to set several environment variables in Visual Studio code. Most of the instructions I've encountered are specifically for launch.json. However, I need to set these variables before the extension (project build extension) is started so it can access them.
The only way I can get the extension to see these variables is by setting them in a shell script before launching VS Code. This is unsatisfactory since the extension completely fails if you open VS code directly, or if you forget to execute the shell script.

Visual Studio Code Associate files to certain launch configuration

I started using VS Code for my Java and Python assignments. I noticed, I have to select a suitable launch configuration prior debugging the file and If I hit 'F5' without changing config it's trying to debug Java file with Python interpreter or vice versa.
At the top right hand side I can see there's an option to debug the file with appropriate compiler but It doesn't work when I just press F5.
I would like to know if I can associate certain file types to certain launch configs so that whenever I switch between different file types the launch config automatically changes according to that?

Visual Studio Code Love2D support extension detecting love.app as a directory

I have just started with löve because of an internet course I'm on, and I'm using Visual studio code as my editor. The course recommends that I use the "Love2D Support" extension with Visual Studio. It allows me to run the code directly from VS by pressing Command + L.
Although when I do it, VS outputs me this error:
The setting specified in pixelbyte.love2d.path must be an executable file, not a directory. Check your settings.
The path I have input in the settings is /Users/My_Username/Desktop/love.app
I am 100% sure that it is the correct directory. What is the problem?
Thanks for answering!
The actual executable file in Mac is /Applications/love.app/Contents/MacOS/love so put this in your pixelbyte.love2d.path command in vscode and you are good to go.

How do i set Environment Variables for Debugging PowerShell in Visual Studio Code?

I need to debug a PowerShell script that uses several environment variables. For practical reasons, I need to be able to change the variables on the fly, and it would be painful to have to restart Visual Studio Code every time I want to change the variables.
In Visual Studio, when debugging C++ code it is easy to set environment variables by configuring the debug settings of your Start Up Project.
I've also found another question that was answered, but it seems to apply specifically to how to configure Environment variables for debugging node.js projects. (How do I add environment variables to launch.json in VSCode)
Is there not a global way to configure environment variables for the Visual Studio Code Debugger?
It's not currently possible.
See this open issue for the Powershell Plugin for Visual Studio Code: https://github.com/PowerShell/vscode-powershell/issues/1472

Is it possible to have Visual Studio Code custom configured from a .ps1 file?

I'm attempting to put together a standard VS Code build for my company. I have a ps1 file that copies/installs extensions for VS Code after it's been installed but I can't seem to find how or even if it is possible to then configure VS Code settings to utilize those extensions.
For example, one of the extensions is "vscode-icons". I can install the extension just fine but then the user needs to setup his preferences manually to actually use the extension by going to the File->Preferences->File Icon Theme->VS Code Icons.
Is it possible to have my ps1 install file actually make configuration changes so any user who opens VS Code has the custom configuration settings?
The config settings for VS Code are JSON files - just needs to locate and edit them.
First check what manual change is doing then create part in the script to edit the settings.
https://code.visualstudio.com/docs/customization/userandworkspace