of course you can do dev work without desktop environments! That's just living in the terminal all day! 🤣 (I use tmux, vim personally).
There's even fancy things with terminal text-editors like neovim where you can even add Copilot features to it.
If you need to be opening a browser frequently and/or enjoy using a mouse with your IDEs than maybe a desktop environment is better for you