I run PyCharm using my docker-compose environment, which works great. A co-worker said he was able to get VSCode working with docker-compose, but the setup wasn't easy. He said something about having to attach to the running docker/python process.
Can you elaborate a little more on how you use pycharm with docker-compose and what are the advantages?
I am new to all this and I have been using Pycharm quite a lot lately but looking at people’s responses above it feels like I am missing something.
Why would you need to connect remotely or where/why does docker fit into this? Isn’t is just an IDE that you install to code/debug?
Sorry in advance if these questions sound a little too primitive.
You can have pycharm on your machine but the actual python interpreter and the dependencies are in a docker container. This means that you don't 1) install python and dependencies needed for your project in your machine directly 2) reuse the docker container setup that is used for say ci and even production deployment while you are doing development.
A year subscription for the individual use license from PyCharm is 89.00 for the first year, 71.00 2nd year, 53 3+ years (all prices in USD) so it isn't a major expensive to get a license.
I would also like this. Like the sibling, I use Pycharm for this specific use case (as in 95% of my work is in vscode, and I drop into pycharm when I need remote interpreter support).
Do you mean connecting a debugger to run/evaluate code in a Docker container? Because I'm pretty sure VSCode does this... or at least I thought it did. (Or is this a feature reserved to full Visual Studio?)
In my time at Facebook that was the killer feature of Nuclide which switched most people to Atom. Ironically, the remote debugger was based on the Visual Studio Tools for Python one.
I’ve found the language server practically useless because of regressions introduced in later versions. This wouldn’t be too bad except the language server auto updates. For now I’ve switched to the default Jedi version which was been working reliably.
The language server team has been working hard to fix the high CPU and memory leaks as recently as this week. Please do try it out on occasion to see if your issue has been resolved as the team is working hard to improve it.
Not to hijack the thread, but does anyone know a good way to run vscode remotely? I have a large c++ code base that only compiles on a specific server, and I'd like to run it there. I tried code-server, but it's extremely buggy, and not quite ready for prime time. X forwarding was also painfully slow. Is vnc the only option?
Why not think of the problem from the other end? Instead of running vscode on the server, run it locally and use one of the SSH/SFTP plugins (e.g. [1] [2]) to sync the code with the server.
Which is honestly what they need to do, to make .net core truly next level. It was such a drag to so C# on non windows machines, and it’s becoming less and less so.
Visual Studio still has some perks, but with the dotnet cli it’s actually decent enough to use .net core on a Mac.
What I don’t get is why they aren’t focusing even more on VS Code, I mean, why bother making Visual Studio for mac when you have an all-platform alternative?
The only bad thing about VSCode is that it has made me really, really hate the dark-theme in visual studio because the code one is so much better.
Yeah never said it was a bad thing. I love VSCode and I like Visual Studio. I wish VSCode could replace Visual Studio for my current work, but I don't think it works well with .NET Framework solutions yet (and may never will).
I find it's not as turn key as Visual Studio. It has a lot of the same, or even better and different functionality, but if I'm opening and new solution, 99/100 times if I want to run it immediately without tinkering it'll be in Visual Studio. I love code for the extensions, but Visual Studio still feels easier to get something up and running in.
I find the opposite to be true. We’ve been a C# shop for decades, but with python and JavaScript creeping in, we’re just so used to clis.
Visual Studio does a lot of things, but the truth is that we never use them. Well except for Linq-To-Sql which is ironically removed from the standard setup because Microsoft considers it bad practice. Five years ago we downgraded from Enterprise to Professional, exactly because what we do 95% of the time is to build from an empty project without using any of the bling. To be fair, some of the bling like GitHub and docker integration have gotten fairly good, but because they were so bad for so long we simply got used to using them outside of Visual Studio.
I suspect that in 5 years we’ll be going from Professional to Visual Studio Code. I hope so, but things like intellisense just isn’t there yet.
I agree. I always kept a Windows VM on my Mac so I could use Visual Studio. About 6 months ago I uninstalled it and just use VS Code now (though my C# usage has also decreased).
I've heard great things about JetBrains Rider but haven't tried it.
Great new features, though it's a little bit shame that we still need to import a .ipynb file manually to work with it (I know it is not the VScode team's fault).
I really wish that the Jupyter community would consider re-design .ipynb file format, such as separating a source code (cells) as a file and stopping using JSON format.
The current .ipynb file format is highly against modern software engineering. Since it contains everything inside of a single file including giant binaries, it is almost impossible to properly version control, and there is no point of using human-readable JSON format because its content is already not human-readable.
Overall I really like this extension and especially its interactive programming / notebook features. I am a big fan of jupyter notebooks, and wrote my own version for Scala (it was more inspired by Mathematica since Juypter didn't exist yet) a long long time ago.
However having all the output be in a dedicated window as this extension does, that allows for scrolling back in the order things were run rather than in the order they are laid out in the notebook is turning out to be better for some use cases. Also, it allows having the output side-by-side which takes better advantage of the horizontal to vertical pixel ratio of monitors.
Another thing I like is that editing cells as plain text using #%% to separate them is just a better more intuitive interface for a programmer than having a bunch of separate text-areas (imho). And it nicely dodges all the padding and unnecessary white-space problems that a Jupyter notebook has compared to a mathematica one, allowing more information to fit on the screen.
For one downside: I haven't ever used an extension that is so inclined to randomly pop up with tips and surveys while I am programming as this one. It's incredibly annoying and I've spent a lot of time trying to figure out how to disable it. Including looking through the code on github, but don't see anyway at all to do it.
It's a catch-22 situation because VS Code doesn't have the option to disable notifications like these, the person in charge of deciding if there should be a feature to prevent popups says that it's an extension issue and to take it up with them. And the extension clearly doesn't have the mindset that it is an issue and frankly I don't think it's an extensions job to re-invent the wheel on this every time so I don't blame them. They are using the tools they have as extension authors because it's clearly not the extensions job to set the style of of notification deliver to the user, only that there is one to present, perhaps with an associated urgency level. The IDE ought to then deliver it in the manner most desired by it's user.
Contrast this with Intellij which works around all of this by simply having a thought out system for notifications, wherein the user, can force them all to go to a log in a panel without a popup, which, for me is great because I'm coding, don't knock me out of the zone!
Thanks for taking the time to write down your thoughts! What are some of the use cases where you find the interactive window superior to Jupyter? Do you use Jupyter as a complement or a replacement to VS Code?
Sorry about the annoying behavior! Some of this is clearly our fault, and I've asked the team to come by and respond to this. I've also added this to the list of things to chat with the VS Code team about as well.
Disclaimer: I originally came up with the idea for the interactive window based on the design constraints of VS Code, but the team that is currently working on this deserves all the credit for building and extending the original idea.
Let me just say I didn't mean to come across as overly negative, I think everyone working on the extension has done a fantastic job, it's a very minor quibble in the grand scheme of things I use multiple different machines so while my settings sync over, some of the "we've already shown the user the popup" stuff might not be (or maybe i need to sync more settings). I just am not a big fan of pop-up notifications in general so turning them off is the first thing I do when I can.
Other minor stuff like that (none of this is at all urgent):
- Having an option to disable requiring a confirm for kernel restarts.
- Smooth scrolling in the interactive window regardless of the higher setting from vscode / electron that disables smooth scrolling.
- Don't scroll on output in the interactive window unless it's currently scrolled to the bottom (Allows reading things at the top while more results scroll in w/o having to fight the scrollbar)
- A bit better support for jupyter magics / builtins without displaying errors (e.g. things like %%html or %%javascript or !ls or 'display(dataframe)' all show errors)
In terms of why I like the split display:
I think it's more conducive to writing re-usable code than Jupyter and I can re-read things in the order that I ran them. It also keeps the code closer to together so I don't have to jump over a bunch of intermediate results when I go between different area of code.
Thanks for making the interactive window, it's been a real pleasure so far and overall I really powerful, I wish it was in every language!
Interesting that you would like to have the extension run in more than one language. What other languages do you use regularly where you'd get a benefit from the interactive window?
I enjoyed Golang in VSCode so much that I started using Python in it for a few weeks.
My favorite things about VSCode are the speed (compared to Pycharm), the custom keybindings, and the integrated terminal that I can snap back and forth to with the keybindings.
The main thing that it lacked was the excellent Python refactoring tools that Pycharm free edition has. I should never have to find and replace to refactor when I'm dealing with code all in the same language.
edit: Also the auto-imports were terrible in VSCode, while they are also excellent Pycharm.
Still using it for Golang, but I'm back to Pycharm for Python.
41 comments
[ 3.3 ms ] story [ 87.0 ms ] threadThe only way I have found this possible is to actually run VSCode itself in docker.
Can you elaborate a little more on how you use pycharm with docker-compose and what are the advantages? I am new to all this and I have been using Pycharm quite a lot lately but looking at people’s responses above it feels like I am missing something. Why would you need to connect remotely or where/why does docker fit into this? Isn’t is just an IDE that you install to code/debug?
Sorry in advance if these questions sound a little too primitive.
Thanks.
The github issue tracking this feature is here: https://github.com/Microsoft/vscode-python/issues/79
Unfortunately there's no major activity on it as of late... but I usually go take a peak every few months and hope...
https://github.com/Microsoft/vscode-python/issues/79#issueco...
For now I will not move away from Jedi again.
[1] https://marketplace.visualstudio.com/items?itemName=liximomo...
[2] https://marketplace.visualstudio.com/items?itemName=Kelvin.v...
https://marketplace.visualstudio.com/items?itemName=Kelvin.v...
Visual Studio still has some perks, but with the dotnet cli it’s actually decent enough to use .net core on a Mac.
What I don’t get is why they aren’t focusing even more on VS Code, I mean, why bother making Visual Studio for mac when you have an all-platform alternative?
The only bad thing about VSCode is that it has made me really, really hate the dark-theme in visual studio because the code one is so much better.
Visual Studio does a lot of things, but the truth is that we never use them. Well except for Linq-To-Sql which is ironically removed from the standard setup because Microsoft considers it bad practice. Five years ago we downgraded from Enterprise to Professional, exactly because what we do 95% of the time is to build from an empty project without using any of the bling. To be fair, some of the bling like GitHub and docker integration have gotten fairly good, but because they were so bad for so long we simply got used to using them outside of Visual Studio.
I suspect that in 5 years we’ll be going from Professional to Visual Studio Code. I hope so, but things like intellisense just isn’t there yet.
I've heard great things about JetBrains Rider but haven't tried it.
I really wish that the Jupyter community would consider re-design .ipynb file format, such as separating a source code (cells) as a file and stopping using JSON format.
The current .ipynb file format is highly against modern software engineering. Since it contains everything inside of a single file including giant binaries, it is almost impossible to properly version control, and there is no point of using human-readable JSON format because its content is already not human-readable.
However having all the output be in a dedicated window as this extension does, that allows for scrolling back in the order things were run rather than in the order they are laid out in the notebook is turning out to be better for some use cases. Also, it allows having the output side-by-side which takes better advantage of the horizontal to vertical pixel ratio of monitors.
Another thing I like is that editing cells as plain text using #%% to separate them is just a better more intuitive interface for a programmer than having a bunch of separate text-areas (imho). And it nicely dodges all the padding and unnecessary white-space problems that a Jupyter notebook has compared to a mathematica one, allowing more information to fit on the screen.
For one downside: I haven't ever used an extension that is so inclined to randomly pop up with tips and surveys while I am programming as this one. It's incredibly annoying and I've spent a lot of time trying to figure out how to disable it. Including looking through the code on github, but don't see anyway at all to do it.
It's a catch-22 situation because VS Code doesn't have the option to disable notifications like these, the person in charge of deciding if there should be a feature to prevent popups says that it's an extension issue and to take it up with them. And the extension clearly doesn't have the mindset that it is an issue and frankly I don't think it's an extensions job to re-invent the wheel on this every time so I don't blame them. They are using the tools they have as extension authors because it's clearly not the extensions job to set the style of of notification deliver to the user, only that there is one to present, perhaps with an associated urgency level. The IDE ought to then deliver it in the manner most desired by it's user.
Contrast this with Intellij which works around all of this by simply having a thought out system for notifications, wherein the user, can force them all to go to a log in a panel without a popup, which, for me is great because I'm coding, don't knock me out of the zone!
Sorry about the annoying behavior! Some of this is clearly our fault, and I've asked the team to come by and respond to this. I've also added this to the list of things to chat with the VS Code team about as well.
Disclaimer: I originally came up with the idea for the interactive window based on the design constraints of VS Code, but the team that is currently working on this deserves all the credit for building and extending the original idea.
Other minor stuff like that (none of this is at all urgent):
- Having an option to disable requiring a confirm for kernel restarts.
- Smooth scrolling in the interactive window regardless of the higher setting from vscode / electron that disables smooth scrolling.
- Don't scroll on output in the interactive window unless it's currently scrolled to the bottom (Allows reading things at the top while more results scroll in w/o having to fight the scrollbar)
- A bit better support for jupyter magics / builtins without displaying errors (e.g. things like %%html or %%javascript or !ls or 'display(dataframe)' all show errors)
In terms of why I like the split display:
I think it's more conducive to writing re-usable code than Jupyter and I can re-read things in the order that I ran them. It also keeps the code closer to together so I don't have to jump over a bunch of intermediate results when I go between different area of code.
Thanks for making the interactive window, it's been a real pleasure so far and overall I really powerful, I wish it was in every language!
Would you mind opening a set of Github issues so that we can get your suggestions onto our backlog? https://github.com/Microsoft/vscode-python/issues
Interesting that you would like to have the extension run in more than one language. What other languages do you use regularly where you'd get a benefit from the interactive window?
Thx!
My favorite things about VSCode are the speed (compared to Pycharm), the custom keybindings, and the integrated terminal that I can snap back and forth to with the keybindings.
The main thing that it lacked was the excellent Python refactoring tools that Pycharm free edition has. I should never have to find and replace to refactor when I'm dealing with code all in the same language. edit: Also the auto-imports were terrible in VSCode, while they are also excellent Pycharm.
Still using it for Golang, but I'm back to Pycharm for Python.