Is it possible to use the “code” command in SSH’ed terminal to open VS Code on local machine with SSH extension?

I found much better & simple answer thanks to this post. Simply create new script file named code with below contents & put file under any folder from $PATH. (echo $PATH to see what folders you can use) #! /usr/bin/env zsh local max_retry=10 for i in {1..$max_retry} do local script=$(echo ~/.vscode-server/bin/*/bin/remote-cli/code(*oc[$i]N)) if [[ -z ${script} … Read more

How do you attach to a remote Java debugger using Visual Studio Code

Create a Debug Configuration like below and press F5 to debug : “version”: “0.2.0”, “configurations”: [ { “type”: “java”, “name”: “Debug (Attach)”, “projectName”: “Your_Project_Name”, “request”: “attach”, “hostName”: “your_host_name”, “port”: Debugging_port } ] Example : “version”: “0.2.0”, “configurations”: [ { “type”: “java”, “name”: “Debug (Attach)”, “projectName”: “MyApplication”, “request”: “attach”, “hostName”: “localhost”, “port”: 8787 } ] I … Read more

How to configure VSCode to run Yarn 2 (with PnP) powered TypeScript

I had this problem last night while migrating to Yarn v2 and using PnP. Make sure that after running yarn dlx @yarnpkg/sdks vscode the following folder structure was created inside your .yarn directory: .yarn/sdks/typescript/lib. Change your VSCode workspace configuration to add the following: “typescript.tsdk”: “.yarn/sdks/typescript/lib” I also had another problem with step 1 while using … Read more

Could not find or load main class – VS Code

This is a known issue https://github.com/microsoft/vscode-java-debug/issues/606, https://github.com/eclipse/eclipse.jdt.ls/issues/1137, which caused the new package not recognized during building workspace. It’s expected to be fixed in vscode-java Middle October release. Current workaround is reload VS Code window, or F1 ->Clean the java language server workspace.

Conda and Visual Studio Code debugging

I found a better solution, based on the previous ones: Go to Workplace Settings. Override the parameter python.venvPath with the Path to folder with a list of Virtual Environments. For the case of anaconda: This setting enables VS Code to recognize the available conda environments. Thus, we can click on the current python interpreter and … Read more

is there a compare folders feature in VS Code?

No. As stated in https://github.com/microsoft/vscode/issues/98197, VS Code does not plan on adding this feature in the near term future. Other options https://marketplace.visualstudio.com/items?itemName=moshfeu.compare-folders claims to compare folders, but I can’t speak to its effectiveness. Usually I would just use diff -r or some type of git diff compare, as comparing a lot of files can sometimes … Read more

Visual Studio Code does not detect Virtual Environments

In VSCode open your command palette — Ctrl+Shift+P by default Look for Python: Select Interpreter In Select Interpreter choose Enter interpreter path… and then Find… Navigate to your venv folder — eg, ~/pyenvs/myenv/ or \Users\Foo\Bar\PyEnvs\MyEnv\ In the virtual environment folder choose <your-venv-name>/bin/python or <your-venv-name>/bin/python3 The issue is that VSCode’s Python extension by default uses the … Read more

On VS Code on macOS, how to keep two projects open in macOS window tabs (instead of two windows)?

Go to Preferences > Settings. Search for native tabs Check the checkbox Code will prompt for restart to take effect. After restart, make sure you have multiple projects open. And then merge all windows as shown below: Enjoy multiple tabs in single window. Note: I think this applies to all Mac OS >= Sierra. Tested … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)