DEV Community

Cover image for VS Code on Your Phone — Yes, It Actually Works 🔥
Gouranga Das Samrat
Gouranga Das Samrat

Posted on

VS Code on Your Phone — Yes, It Actually Works 🔥

Extensions, IntelliSense, debuggers — the full experience, running natively on Android.

You've got VS Code running in Termux. You open it, install a Rust or Lua extension, and... the language server does nothing. No autocomplete. No error highlighting. Just silence.

This happens to almost everyone. And the fix is simpler than you think.

New here? This guide assumes you already have Code-OSS (code-oss) installed in Termux. If you haven't set that up yet, check out the previous post first — Turn Your Android Into a Full Desktop — No Root Needed — which covers installing a full XFCE4 desktop with Code-OSS on Termux, no root, no hacks, no proot required. Come back here once you're set up. 👋

This guide — based on the GourangaDasSamrat/dotfiles repo — walks you through two things:

  1. Making Code-OSS look and behave like the real Visual Studio Code (including access to the official VS Marketplace)
  2. Fixing language servers for Rust, Lua, and the CodeLLDB debugger so they actually work on Termux

🤔 Why Doesn't It Just Work Out of the Box?

Termux ships code-oss — the open-source build of VS Code. The problem is that VS Code extensions bundle their own pre-compiled binaries (language servers, debuggers), and those binaries are compiled for x86 Linux. They don't run on ARM Android.

The fix? Install the correct ARM binaries via Termux's package manager, then symlink them into the extension folders. Simple once you know it — confusing until you do.


Part 1 — Make Code-OSS Feel Like the Real VS Code

Unlock the Official VS Marketplace

By default, Code-OSS points to the Open VSX registry, not Microsoft's official Marketplace. A small config change fixes this and also renames the app to "Visual Studio Code" so everything feels native.

Edit the product config file:

nano /data/data/com.termux/files/usr/lib/code-oss/resources/app/product.json
Enter fullscreen mode Exit fullscreen mode

Add or update these properties:

{
  "nameShort": "Visual Studio Code",
  "nameLong": "Visual Studio Code",
  "applicationName": "code",
  "dataFolderName": ".vscode",
  "linuxIconName": "code",
  "urlProtocol": "vscode",
  "extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.vo.msecnd.net/gallery",
    "itemUrl": "https://marketplace.visualstudio.com/items"
  },
  "linkProtectionTrustedDomains": [
    "https://open-vsx.org",
    "https://marketplace.visualstudio.com",
    "https://vscode.vo.msecnd.net"
  ]
}
Enter fullscreen mode Exit fullscreen mode

Save and restart Code-OSS. You now have the official Marketplace, the official name, and the code command in your terminal. It's VS Code. On your phone.


Part 2 — Fix Language Servers That Don't Work

The pattern for every broken language server is the same three steps:

  1. Install the correct binary via apt
  2. Remove the broken bundled binary that came with the extension
  3. Symlink the working system binary in its place

Let's go through each one.


🦀 Rust — rust-analyzer

Step 1 — Install the system binary:

apt install rust-analyzer
Enter fullscreen mode Exit fullscreen mode

Step 2 — Remove the broken bundled binary:

rm ~/.vscode/extensions/rust-lang.rust-analyzer-*/server/rust-analyzer
Enter fullscreen mode Exit fullscreen mode

Step 3 — Symlink the working one:

ln -s $(which rust-analyzer) ~/.vscode/extensions/rust-lang.rust-analyzer-*/server/rust-analyzer
Enter fullscreen mode Exit fullscreen mode

If the * wildcard doesn't work, run ls ~/.vscode/extensions/ to find the exact folder name and replace * with the version number.

Reload VS Code and open a .rs file — autocomplete, type hints, and error checking should all be live. 🦀


🌙 Lua — lua-language-server

Step 1 — Install the system binary:

apt install lua-language-server
Enter fullscreen mode Exit fullscreen mode

Step 2 — Remove the broken bundled binary:

rm ~/.vscode/extensions/sumneko.lua-*/server/bin/lua-language-server
Enter fullscreen mode Exit fullscreen mode

Step 3 — Symlink the working one:

ln -s $(which lua-language-server) ~/.vscode/extensions/sumneko.lua-*/server/bin/lua-language-server
Enter fullscreen mode Exit fullscreen mode

Open a .lua file and watch IntelliSense spring to life. 🌙


🐛 CodeLLDB — Native Debugger for Rust & C++

This one has more moving parts because CodeLLDB bundles several binaries. Same approach, just more symlinks.

Step 1 — Install the system binaries:

apt install codelldb
Enter fullscreen mode Exit fullscreen mode

Step 2 — Remove all the broken bundled binaries at once:

rm -rf \
  ~/.vscode/extensions/vadimcn.vscode-lldb-*/adapter/codelldb \
  ~/.vscode/extensions/vadimcn.vscode-lldb-*/lldb/bin/lldb \
  ~/.vscode/extensions/vadimcn.vscode-lldb-*/lldb/bin/lldb-server \
  ~/.vscode/extensions/vadimcn.vscode-lldb-*/lldb/bin/lldb-argdumper
Enter fullscreen mode Exit fullscreen mode

Step 3 — Symlink all four system binaries:

ln -s $(which codelldb)       ~/.vscode/extensions/vadimcn.vscode-lldb-*/adapter/codelldb
ln -s $(which lldb)           ~/.vscode/extensions/vadimcn.vscode-lldb-*/lldb/bin/lldb
ln -s $(which lldb-server)    ~/.vscode/extensions/vadimcn.vscode-lldb-*/lldb/bin/lldb-server
ln -s $(which lldb-argdumper) ~/.vscode/extensions/vadimcn.vscode-lldb-*/lldb/bin/lldb-argdumper
Enter fullscreen mode Exit fullscreen mode

Set a breakpoint, hit F5, and you've got a working debugger. On Android. 🤯


🔍 Troubleshooting — When Things Still Don't Work

If a language server or debugger is still misbehaving after following the steps above, run through this checklist:

Check that the symlinks actually exist:

ls -l ~/.vscode/extensions/[extension-folder]/server/
ls -l ~/.vscode/extensions/[extension-folder]/adapter/
Enter fullscreen mode Exit fullscreen mode

Verify the symlink targets are executable:

file $(which codelldb)
file $(which lldb)
Enter fullscreen mode Exit fullscreen mode

Reload the language server without restarting VS Code:

Press Ctrl+Shift+P → type Restart Language Server → hit Enter.

Check for error details:

Open the Output panel (Ctrl+Shift+U) and select the language server from the dropdown. The error messages there are usually very specific and point right to the problem.


💡 Quick Recap

Language / Tool Package to Install What You Symlink
Rust rust-analyzer server/rust-analyzer
Lua lua-language-server server/bin/lua-language-server
CodeLLDB codelldb adapter/codelldb + 3 lldb binaries

The pattern never changes: apt install → rm broken binary → ln -s system binary. Once you understand this, you can apply it to any other language server that breaks in the future.


📁 All Configs Live in the Dotfiles Repo

The full setup, including a curated list of recommended VS Code extensions for Termux, lives here:

👉 github.com/GourangaDasSamrat/dotfiles

Check docs/vscode/ for both this setup guide and the full extensions list.


🏁 You Now Have a Real Dev Environment on Android

A working VS Code with IntelliSense, language servers, and a native debugger — all running on your phone without any root, emulation, or cloud tricks.

Whether you're coding Rust on your commute or debugging Lua on your lunch break, your Android is now a legitimate development machine.

Go ship something. 🚀


If this helped, star the dotfiles repo on GitHub! ⭐


📖 Read the previous post in this series:
Turn Your Android Into a Full Desktop — No Root Needed — Install XFCE4 + Code-OSS on Termux from scratch, no root, no proot, no hacks.

Top comments (0)