![]() ![]() In this post, we’ll be using the Remote - Containers extension. ![]() This installed three extensions: Remote - SSH, Remote - Containers, and Remote - WSL. The first thing we needed to do was install the remote development extension. With all this done, we were able to move on to getting this to work in a Docker container! Docker Setup After compiling our test binary, it simply picked it up and showed the available tests, and we were able to run them. We found the VS Code extension CodeLLDB worked pretty much out of the box.įor testing, we found C++ TestMate, which also just worked. We prefer using LLDB as our debugging tool of choice, mostly because this is what is automatically available when using Xcode, and we wrote our own small extensions to make things easier. On macOS, we had to add -query-driver=/usr/bin/clang++ as an argument for clangd to work correctly, but apart from that, we didn’t need to do anything else. This made us decide to try the clangd extension first, and we’re happy to report that it works really, really well. Our code works on many different compilers, but most platforms use Clang. We needed extensions for this, and luckily, VS Code has a ton of them! We won’t go too much into the specifics of configuring them because this is out of scope for this blog post, but in general, they all mostly just worked.įor CMake, we used the now-Microsoft-maintained CMake Tools. If all of this were to work out, we’d be able to work more quickly than we can now, even using an old laptop! Local Setupīefore attempting to do all of this remotely, we tried getting a complete environment set up for local development. It also made a lot of sense because we could use the same compiler and development environment we use for our tests. With this in mind, we started looking at the remote Docker support of VS Code. We automatically test our C++ code on each platform we support, but the easiest setup we have is for testing on Linux using Docker. ![]() At PSPDFKit, we have a pretty big C++ codebase, which is something that can easily suffer from too little computer power, so we figured we’d look into using the new remote support! The Idea This means the UI can run on your local computer, but all the heavy lifting can be done on a remote server. ![]() Microsoft announced a while ago that it added support for using Visual Studio Code remotely. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |