There’s a previous post on here with a guide on how to do this. Essentially, VSCode can attach to distroboxes the same way as with devcontainers.
One thing to note is that you need to have that json config in there before attaching to your distrobox, otherwise it will mess with your git config and won’t play nicely if you have multiple distroboxes in the same home.