PyCharm Vs. VS Code

PyCharm Focuses on Project Based on Python and VS Code Is General-Purpose

PyCharm is a famous IDE delivered by JetBrains. Visual Studio Code (VS Code) is a popular source-code editor for its price (free) and many features. Do not be confused with Microsoft Visual Studio

PyCharm is IDE because it gets ready to set up a Python project out of box. You don't need extra setups to begin developing a Python project smoothly unless you need a more specific development feature for a special scenario. You only need to configure the project (e.g. tell which Python interpreter to use), and do not need to set up PyCharm itself like installing plugins for Python.

To use VS Code to develop a Python project, you need to make up your source-code editor (via plugins most of the time) to make it be an IDE. With this source-code-editor-with-plugins approach, VS Code could be regarded a more general-purpose tool. In contrast with this point of view, PyCharm focuses on Python and make itself be general-purpose (via plugins mostly) as much as possible.

The Mindset of Usage Behind PyCharm Maybe a Unix-Like Developer and Users of GNU Tool

Apart from the native IDE point of view, when setting up PyCharm, I feel like the mindset behind the workflow of setup seems for GNU tool users, or designed by GNU tool users or someone who is understanding the unix-like systems well.

For example, when setting up SSH remote debugging environment, the setup UI knows to prompt you the least necessary information for the IDE to connect correctly. Docker and docker-compose also gave me the same feeling.

The Mindset of Usage Behind VS Code Seems "a Set of Bricks"

A set of bricks provide the flexibility to customize your source-code editor, and take a potential risk of non-optimization.

The benefit of full of community plugins of VS code is you can always find a working solution for your purpose. For example, make your VS Code be a Python IDE or a JAVA IDE.

The downside may be that the solution may not fit your purpose so much. It could be simply working, but not perfectly.

There are a lot of perfect VS Code plugins for sure, but plugin-to-plugin may not communicate with each other that much (because they are owned by different sub-communities.). If your project is small or simple enough, the plugin solution of VS Code should fit you. If your project is getting bigger and more complex, pay attention on the collaboration between plugins may help you save some of your time.

Setup Example of a Python Project

Now, let's take a look of practical setup process of SSH and docker-compose debugging for a Python project.

For PyCharm, simply keep in mind the 3 components are correctly: remote interpreter, deployment, and SSH configuration (for deployment and debugging interactively). You may understand option like "use rsync for deployment" and "keep alive by pinging for n seconds" if you are an experienced/advanced unix-like or GNU tool user.

When setting debugging in the docker container launched by docker-compose, simply update the mindset a bit with the notion which the docker container will be recreated each time when launching debugger.

For VS code, do not expect the knowledge of GNU tool will be useful. The knowledge may or may not be useful. It really depends on which plugin you choose. Secondly, always keep in mind VS Code is a solution of general-purpose source-editor with plugins. The plugin you choose matters, and you may probably need a set of plugins to make sure the solution fit your project and debugging purpose.

When setting debugging in the docker container launched by docker-compose, I choose Visual Studio Code Remote - Containers extension. You can tell from the stack diagram and system requirements of the instruction page of the extension to tell it is made from a general-purpose approach and the mindset of "a set of bricks" by installing a lot of different requirements firstly.

Additional Difference

PyCharm Uses Graphic UI and VS Code Uses JSON for Configuring

You can configure PyCharm from the .idea folder for sure, but PyCharm expect you can find out everything you need easily via its graphic UI.

I touched the JSON of project-wide and extension-specific settings when using VS Code much often because UI for configuration is not straightforward for me, a GNU tool user.

Support by a Company or a Community?

JetBrain is a company focusing on IDE and Microsoft is a giant company driving a lot of products. Conway's law may be applied to their end product. So does the plugin ecosystem.

For example, JetBrain needs to survive by listening to users very carefully (and make a response, a plan, or something). VS Code seems to rely on its extension ecosystem with a lot of users, and it means the response of the community of extension matters.

PyCharm Supports Python Community Explicitly

Probably because of the essence of surviving, PyCharm needs Python (and Python is simply one of the applications of VS Code). A win-win policy like PyCharm donating to Python Software Foundation (PSF), or plan to promote both PyCharm and PSF is common. For example, the plan that all proceeds from every new PyCharm Professional Edition license purchased with the discount code went to the PSF's general fund in the end-of-the year fundraise plan of PSF.

Upstream and Fork

You can tell that PyCharm seems a fork from the Github repository of IntelliJ IDEA

I did not check the source code, but I believe VS Code is the fork of Microsoft VS Code.

Summary

In a nutshell, PyCharm vs. VS Code:

To be honest, this topic of this post is not so appropriate because essentially they, PyCharm and VS Code, are different solutions fitting into different scenarios. It's a fallacy to compare them, but it is a question being asked very often. They both have their own good and down-sides. Choose the one fitting your use case.