I've been trying to avoid installing ROS2 natively, using vagrant and docker to isolate and version my robotics setup. The problem I keep encountering has been lack of autocomplete on my native IDE as a result.
As an experiment I installed the VS code cli and tried the tunneling feature - works wonderfully. My browser acts as vs code running natively on the bot's OS.
Interestingly, I find that when I'm running gazebo the screen would freeze, but not in the guest OS itself - and not the virtualbox client either.
While running the code server, I found that it still was running fine, implying it was a display lockup (or X server lock up (and not an OS lock up) instead.
I still need to figure out the cause for that. I'm using hardware acceleration, a huge chunk of ram (24GB), and increased the video memory. Unsure what could be causing it at this point.
Ah one more note - once you get the Remote - Tunnel extension, you can use your desktop Code application and directly connect to the tunneled machine - even getting access to other folders. It uses the remote code's extensions + interpreter, so I get my autocomplete, but have to set all my extensions up on the guest this way.
Not too bad a pattern to use in development.