How can you launch VSCode with multiple extensionDevelopmentPath sources? - visual-studio-code

I'm trying to test local changes of omnisharp-vscode in conjunction with my own local extension. I can't for the life of me figure out how to boot the VSCode experimental instance with more than 1 extension.
I've tried:
Providing multiple extensionDevelopmentPath arguments when booting
vscode
Running omnisharp-vscode and then opening and running my other extension in the experimental instance.
None of the above have worked for me.

The easiest solution would probably be to simply move one (or both) extensions into your .vscode/extensions directory. This might require you to remove the marketplace installs of those extensions if present. Even though "development installations" of extensions like this are not officially supported yet, they work just fine regardless.

Related

Is there a VSCode configuration variable for the bundled extensions folder?

I'm authoring an extension and running it in the debugger, which is mostly working smoothly.
But I'd like to disable debugging other extensions while I'm debugging mine.
I've been able to disable debugging for installed extensions using this, in my launch.json:
skipFiles: [
"${env:HOME}/.vscode/extensions/**"
]
(Incidentally, I don't know whether that's the right location on Windows -- it might be -- but I'm on macOS. It's probably correct for Linux also.)
But I can't seem to disable it for bundled extensions without hard-coding my VSCode installation location:
skipFiles: [
// Below does not work for some reason
"${execPath}/../../Resources/app/extensions/**",
// Below works if we have correctly guessed the install location
"${env:HOME}/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/**"
]
I dumped the VSCode environment and I have a bunch of variables that look fairly unreliable, like VSCODE_GIT_ASKPASS_MAIN, that basically lead me to the same problem. I'm not sure why the execPath variable above doesn't work, but even if it did, it'd be macOS-specific. My other solution requires me to guess the install location (which I guess I could try to do with versions for Windows / macOS / Linux and dealing with common installation locations for those, but even this would not be foolproof).
Is there another, more directly applicable configuration variable I could use for this purpose? My question is similar to this one, but in that one the need was to access an extension's own path from its implementation; mine is from the launch.json configuration file (and I want the path for all extensions, not my extension).

Duplicate hints while typing expression in Visual Studio Code

Why do I have the same suggestions while typing expression?
Example:
I had exactly the same problem. After a week or so, it get really annoying.
basically, as the comments hint to, there are probably multiple linting or intelisense tools. In my case (for python) i had the pylance extension added.
When i disabled this, the problem went away, but features were missing. So i added it back...
For some reason (i dont know why), this fixed the problem !!!
I can only hypothesise that in some way the extension was corrupted. Nevertheless, it worked.
EDIT:
I can also confirm that unchecking this setting appears to work:
Jupyter: Pylance Handles Notebooks
My current system is Windows 11, with python 3.10.
Final edit (8 Dec 2022):
This is resolved here:
Please could you install VS Code 1.74 and the latest Jupyter, PyLance and Python extension and confirm this still exists.
Visual Studio Code provides an API so third-party extensions and built-in modules can contribute suggestions for auto-completion pop-ups. The system is currently designed so suggestions are merely appended—there's no duplicate detection or removal (perhaps because extensions can also take care of sorting suggestions and such algorithm would get on the way). That means that if you have more than one extension or module for a given language you can easily get duplicate entries.
Having several extensions for PHP is not necessarily a bad idea since they can address different needs (for instance, PHP DocBlocker just creates annotations, it doesn't provide auto-completion suggestions) but you have at least two extensions (PHP Intelephense and PHP Intellisense) that do exactly the same things. That's likely to hurt performance (all your workspace files will be scanned several times) and just adds noise.
I suggest you read the extension descriptions carefully to learn what they do exactly and then figure out which ones you need. Remember that extensions can be enabled/disabled in a per-workspace basis.
The following is just my own totally subjective opinion. Among the PHP extensions that provide code intelligence only two of them seem mature enough:
PHP Intelephense
PHP Intellisense
I've tried both. PHP Intelephense works best for me than PHP Intellisense so that's the one I've kept. I've also disabled php.suggest.basic following the installation instructions because basic suggestions didn't add any value to me (they were blind string matching):
Turn off the php.suggest.basic setting for best results.
... as well as taming builtin Emmet support, which was providing really dumb suggestions:
"emmet.showExpandedAbbreviation": "inMarkupAndStylesheetFilesOnly"
YMMV.
TLDR; Installing pre-release version of Jupyter solves (v2022.11...)
Ok, so after some more extensive experimentation I think I found what's causing this in my case. After looking at the processes I noticed that there were two Pylance processes running, and consistently this would only be a problem if I was working in a session with a jupyter notebook open or one that had been opened.
saun89 17740 37.3 0.3 1008004 199492 ? Sl 20:58 0:22 /home/saun89/.vscode-server-insiders/bin/fef85ea792f6627c83024d1df726ca729d8c9cb3/node /home/saun89/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2022.11.32/dist/server.bundle.js --cancellationReceive=file:9178e897a2b78b36bfd167f79b36c3bdad2931d71b --node-ipc --clientProcessId=17651
saun89 18743 257 0.7 1304584 382288 ? Sl 20:59 0:20 /home/saun89/.vscode-server-insiders/bin/fef85ea792f6627c83024d1df726ca729d8c9cb3/node /home/saun89/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2022.11.32/dist/server.bundle.js --cancellationReceive=file:8744a321767eed92821fd737be4dc7dcfb728284e5 --node-ipc --clientProcessId=17651
Pylance basically spins up a service for the workspace, and then spins up a separate service for the notebook.
Output from "Python Language Server" logs:
Disabling Jupyter removes the duplication, and after installing an earlier version of the extension (v2022.4) this appears to have fully resolved the issue. I'm going to go ahead and log the extension bug once I have something reproducible.
As of 11/30/22, Jupyter Extension Pre-Release version v2022.11.1003281132 is the latest version fixes this issue. Click the gear icon next to the extension and you should see "install another version..." Then you can select version v2022.11.1003281132.

VSCODE remote editing, download-on-open option?

I am mostly editing files remotely in VSCode, and have tried several sftp extensions. ftp-sync has been the best so far, but there is one nagging problem that hopefully someone has solved: Upload-on-save is great and works perfectly, but I'd like to Download-on-open also (with bonus points for warning if the file is different). I sometimes edit the remote files on the remote server, and because there's no check in vscode on open, it's easy to lose those changes. Anyone run into this and have suggestions for a different extension that works this way?
A recent release on March 19th of https://github.com/liximomo/vscode-sftp has added support for this functionality with downloadOnOpen. It works perfectly for my use case (if there's an updated version of the file on the server, download and use that). The UX is a little rough still, but will surely improve over time.
If you're using git locally, there's very little chance of losing local changes, so this works perfectly for the case where you want to edit and manage files locally, but stay in sync per-file with a remote ssh/sftp server.
Look into the Remote VSCode plugin. It doesn't do FTP-like navigation, but if you use SSH, you can tunnel an editing session over the connection into VSCode pretty easily. It felt a little wonky at first, but I use this plugin constantly. As I work across a fleet of a few hundred servers, this option made a lot more sense than trying to set up some of those "deploy" plugins for each host.
Check This Extension on VSCode.Its really awesome.
Remote WorkSpace

Eclipse Auto-Upload on Save, Without Aptana

I'm using Eclipse to develop a website, and I don't want to run Apache, PHP, and MySQL on my local computer. I already have a remote Linux server set up to do that. What I want though, is every time I save a file, Eclipse should upload that file to the Linux server. Dreamweaver does an absolutely perfect job at this task, but I prefer many other features in Eclipse.
I am well aware that there are many, many posts on Stack Overflow about this topic. I have reviewed them, but none seem to quite meet my needs. I'll go through all the possibilities I know about, and talk about why they're not quite right:
Aptana - I specifically excluded this in the question's title. Yes, it does what I'm asking for, but if you install it as an Eclipse plugin, it totally takes over your Eclipse. I only want this one feature, not the whole 800-pound gorilla that changes everything.
Remote System Explorer - I want the primary version to be on my hard drive, not the remote server. This is because I want faster file open, and code completion.
GIT or SVN - When I see other people ask this question on Stack Overflow, someone usually answers "use Git or SVN." Well, I'm already using Git. When I want to sync the entire project, and not just iterate on one file, I will do it using Git. But standalone Git is way too slow if all you want to do is see your changes working. I also don't want to see hundreds of meaningless commits. PTP, mentioned below, is a little better and a little faster, but not fast enough.
PTP - This is an Eclipse plugin that not too many people seem to know about. It has the ability to sync a local folder and a remote folder using Git, and it can do it automatically every time you hit save. This is absolutely awesome, but unfortunately a little slow. When I hit save in Dreamweaver, the change is uploaded to the server in less than one second. The PTP Git operation takes 10 seconds on a tiny project, and I bet that wait gets larger with a larger project. I'm a huge believer in super-fast iteration, and all that PTP waiting will really slow me down.
WebDAV and FTP support for Eclipse - It seems like this is no longer actively developed.
FileSync - Pretty neat, but only supports local filesystem folders.
Are there any other options that I've overlooked? Or are my requirements so specific that there's nothing that fits me right. It seems like there would be other people who want exactly the same thing.
This is my suggestion and it is not quick way to do this, but very customizable.
In eclipse you can set external tools.That means, you can set a php/java script file as external program and send some params that eclipse gives you(${resource_loc} ${project_name} ${resource_path}).
So with script file you can login to SSH or FTP or what ever you want and sync your file or project with remote system.
Just in External Tools Configuration window in eclipse you must set Location to /usr/bin/php
and in Arguments, you can set script path with eclipse variables as script args.
At last you should assign some short key to external program IF Possible.
Did you consider set up Samba server on your Linux and work on you local computer but store project in remote directory served by Samba from Linux or use mentioned FileSync to sync local working directory with network directory (which for Windows look like local and thus FileSync should work).
Or Dropbox?
Edited:
You are constrained heavily I see. Maybe you have on remote host rsync? You could write small utility to manage if your local folder changed (for Windows: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365261(v=vs.85).aspx) and then synchronize folders with rsync via ssh (https://www.digitalocean.com/community/articles/how-to-use-rsync-to-sync-local-and-remote-directories-on-a-vps). This would be completely independent from Eclipse.
you can have a try with CodeSync #github (I write it)
or this one
https://github.com/zhwj184/remotedeploy
Now I am in 2021, and most of the above methods cannot work at all.
Finally, I find a small plugin in Eclipse that is very easy to upload the files (may be not auto-load, but is very easy).
Install the "Alibaba Cloud Toolkit" plugin in Eclipse Marketplace;
Using the right-click "deploy" item to deploy the selected files/directory to the remote directory.
There is also a problem. In my eclipse, the inside Terminal is blank (for all terminals including local terminal and SSH terminal), the blank terminal
But the terminal in RSE is ok.
The terminal in RSE
I also tried to uninstall Alibaba Cloud Toolkit, CDT, TM Terminal, etc.
But the inside terminal does not work anymore.
So I use the terminal in RSE now and put its view, as I just want to run my code on the remote server.

Team foundation server on the Mac with Vim

I'm using Vim on a Mac for front-end development and was recently hired at the company that uses Team Foundation Server as their version control system.
I would hate to have to switch to using Visual Studio on Windows because I'm so used to Vim and the Mac.
I found this and was hoping that would be a possible solution. I would still like to avoid editing code in Eclipse. However I wouldn't mind opening Eclipse to do version control stuff.
I'm very unfamiliar with Eclipse and Team Foundation Server (not VCS in general) and I need some advice on how to actually use it.
I'm able to connect to the server and find the project I have to work on, but from here I'm lost. This is the window I'm stuck at.
Anyone who are in a similar situation and could offer some help?
You've done the hard bit I think, firstly you should be able to safely ignore the Work Item and Build "folders" unless someone explicity tells you to use work items, at which point they can show you what you need to know as it works exactly the same as in Visual Studio.
If you double click on the Source Control folder it will open a new window which will show you the source "tree". To be able to Get, Checkout and add source files to the tree you'll need to set up a workspace. Once you've done this then you can get the code and check out.
With Team Explorer Everywhere You also have the option of using the tf command line in the Mac terminal. This would eliminate the need for eclipse. (I'm assuming that as a Vim user you're not afraid to use the terminal)
Another option might be svnBridge however I think you need the server version if you're using a Mac, and this requires a site to be installed in the TFS application server which might not be an option.
Finally TFS now offers support for integration with GIT.