Re:GitHub Codespaces
by petargyurov on Wednesday May 06, 2020 @02:36PM
(#23094677)
I made the transition from PyCharm to VSCode a couple of days ago and... it's not been smooth. Virtualenv doesn't automatically activate when I first open the workspace, pylint doesn't work yet VSCode thinks it's working and debugging just doesn't seem to work full stop.
I need to get back to it and try to fix it because I do like VSCode as a whole.
One thing that helps me managing Python environments in VS Code: I start VSCode from the command line with my virtual environment activated ("code -n .").
With this, I rarely have issues with VSCode picking up my environment. Hope that is of some use to you.
Re:GitHub Codespaces
by petargyurov on Thursday May 07, 2020 @05:08AM
(#23101129)
I will try it, thanks.
Pro-tip for VSCode: if you have a .venv directory in the root of your project, VSCode will try to activate it when you open the project. A few other tools have adopted that convention, too, and now at my job so have we. Rather than sticking virtualenvs in some odd location, the venv for ~/projects/mystuff is ~/projects/mystuff/.venv, and now it almost always Just Works.
Re:GitHub Codespaces
by petargyurov on Thursday May 07, 2020 @05:07AM
(#23101126)
Mine is in the root directory but it's called venv, without the preceeding dot. I'll dig around the settings to see if I can change what it looks for.
Strangely it works if I close the initial termnial it spawns and open a new one.
With the Go language server kicking off, Go development in VS Code is literally a breeze. Every single thing I'd want to do (format code, imports, run tests, run a particular test, debug a test, breakpoints, on and on) has been integrated into the VS Code plugin and it works pretty much seamlessly. I haven't used Goland since it's early release in 2016 or so, so I might be missing out on something, but it doesn't feel like it.
I've never had a good experience with PyCharm. Again might be because I've using earlier releases and things have gotten better. But I'm at a point where I'm too comfortable with VS Code and have customized it to a point where I don't think it's worth it for me to switch to another editor, especially one that is tied to a particular language.