5 ms·
I recently switched to working with Python over PHP. When I started working on this project no one on the team used a debugger nor knew how to set it up. VSCode
by memco 7y ago
I recently switched to working with Python over PHP. When I started working on this project no one on the team used a debugger nor knew how to set it up. VSCode became the easiest path for debugging so I use that but it doesn’t handle multi-threaded code well yet so it’s been a bear trying to debug. On the other hand. I added three lines of xdebug config to my PHP.ibi and I can remote debug the PHP stuff no problem. Granted it doesn’t have as much introspection as other languages it was still a much less painless process to dive in and see what the code was doing.
On the framework side, Laravel beats the pants off Flask or django IMO when it comes to deployment, asset build pipelines, queues and database migrations. Almost all of those can easily be configured with laravel and are very flexible. In Python world I had to do a lot of setup to get that kind of thing going.
Virtualenvs and pipemv and poetry weren’t terribly hard to configure but it took a lot more time to learn than PHP composer. Granted the ease of switching envs and versions in Python seems a lot simpler than PHP once it’s all setup.
- int_19h 7y agoTo clarify - are you seeing issues with multi-threaded debugging in VSCode with Python, or with PHP?
- memco 7y agoPython. I have been watching the PTVSD development very closely since 5.0 aims to address most of the problems I have. They just got spawn and fork support in recently so things should be much better now but it’s still pre-release and there’s a number of open issues left to solve. I didn’t have to work on threaded code in PHP so it may not have been fair to bring that up at all since it’s mostly irrelevant to the point that it was very easy to setup PHP debugging for my use cases and it was slightly more work to setup Python initially.
- int_19h 7y agoThe improvements in the new version of ptvsd are around multi-process debugging, though, not so much multithreading, hence why I was curious. Multithreading was supported before VSCode even, going all the way back to PTVS 1.0, so if we still have any major issues with that, I'd definitely like to know!
- stef25 7y agoIf you're using Laravel + Homestead you can configure PHP versions on a per project basis in your yaml file and changing it just requires a vagrant reload