Symbol Demangler for Visual Studio Code
Have you ever been reading a crash log or disassembly while coding or debugging that contained mangled symbols and then had to copy and paste them and run a separate command to demangle them? Or do you frequently find yourself piping those logs/disassembly outputs into your demangler?
This extension aims to make those workflows a bit easier. Just open an editor with a file that contains demangled symbols, and the extension will detect those and add inline decorations that show the demangled symbols.
Quickly copying the demangled symbol
The extension adds a Copy As > Demangled Symbol command to the main menu and editor context menu that copies the demangled form of the symbol where the cursor is currently located.
Copy As > Demangled Symbol can also be accessed by pressing Ctrl+K Ctrl+M on Linux/Windows and Cmd+K Cmd+M on macOS.
Languages can support presenting additional information about a symbol when the
user hovers over it in the editor. Currently, only Swift supports this by
showing the demangling node structure (i.e., the output of
For macOS users, the tools above are installed as part of Xcode. On other operating systems, install them using your preferred package manager.
Each demangler supports two settings, which can be edited in the Preferences editor:
Adding a New Demangler
If you want to add a new demangler, follow the steps below. The C++ and Swift demangler implementations can serve as a guide.