惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Jina AI
Jina AI
H
Help Net Security
月光博客
月光博客
Y
Y Combinator Blog
I
InfoQ
博客园 - Franky
W
WeLiveSecurity
The Register - Security
The Register - Security
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Blog — PlanetScale
Blog — PlanetScale
H
Hacker News: Front Page
L
LangChain Blog
S
Security @ Cisco Blogs
Hacker News - Newest:
Hacker News - Newest: "LLM"
罗磊的独立博客
V2EX - 技术
V2EX - 技术
H
Heimdal Security Blog
博客园_首页
SecWiki News
SecWiki News
N
News and Events Feed by Topic
B
Blog RSS Feed
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AI
AI
Google Online Security Blog
Google Online Security Blog
MongoDB | Blog
MongoDB | Blog
T
Troy Hunt's Blog
A
About on SuperTechFans
WordPress大学
WordPress大学
小众软件
小众软件
The Last Watchdog
The Last Watchdog
J
Java Code Geeks
PCI Perspectives
PCI Perspectives
博客园 - 聂微东
N
News | PayPal Newsroom
Schneier on Security
Schneier on Security
Help Net Security
Help Net Security
Martin Fowler
Martin Fowler
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
U
Unit 42
博客园 - 司徒正美
Forbes - Security
Forbes - Security
酷 壳 – CoolShell
酷 壳 – CoolShell
S
Security Affairs

The JetBrains Blog

Kotlin Turns 15: Celebrate the Kotlin Effect - The JetBrains Blog PhpStorm 2026.2 is Now Out - The JetBrains Blog Key Takeaways From PHPverse 2026 - The JetBrains Blog What's New in IntelliJ IDEA 2026.2 - The JetBrains Blog What’s fixed in IntelliJ IDEA 2026.2 - The JetBrains Blog CLion 2026.2 Is Here - The JetBrains Blog DataGrip 2026.2: AI Agent Skills, MCP Tools and CLI Commands for Data Source Management, Bundled JDBC Drivers, and Improved Session Control - The JetBrains Blog Download WebStorm 2026.2: TypeScript 7 Support, AI, and more GoLand 2026.2 Is Now Available! - The JetBrains Blog Code in Space: Redefining Tech Creation with AI and XR - The JetBrains Blog Rider 2026.2 Release Candidate Is Out! - The JetBrains Blog ReSharper 2026.2 Release Candidate Released! - The JetBrains Blog JetBrains GameDev Days 2026 – Call for Speakers - The JetBrains Blog MPS 2026.1 Has Been Released! - The JetBrains Blog IntelliJ Scala Plugin 2026.2 Is Out! - The JetBrains Blog What's New in ReSharper 2026.2 for VS Code-compatible editors  - The JetBrains Blog Debugging for .NET in VS Code and Cursor: The #1 Requested Feature Is Here - The JetBrains Blog dotInsights | July 2026 - The JetBrains Blog The History of Kodee, Kotlin’s Mascot - The JetBrains Blog JetBrains Academy – June Digest - The JetBrains Blog Introducing the Kotlin Benchmark for AI Coding Agents - The JetBrains Blog Best Object Detection Models for Machine Learning in 2026 - The JetBrains Blog What's Next for TeamCity – CI/CD by JetBrains - The JetBrains Blog The Benchmark Meaning Gap - The JetBrains Blog JetBrains AI for Teams and Organizations: From Fragmented AI Usage to Coordinated Software Development - The JetBrains Blog Java Annotated Monthly – July 2026  - The JetBrains Blog Shift-Left with JetBrains Qodana Speaking to AI Agents like Cavemen Saves 65% of Tokens. We Test. In Conversation With the Golden Kodee Winners - The JetBrains Blog Toolbox App 3.6: Smarter Storage Cleanup, Windows installation diagnostics, and More - The JetBrains Blog IntelliJ IDEA 2026.1.4 Is Out! - The JetBrains Blog TeamCity 2026.1.2 and 2025.11.6 Are Now Available - The JetBrains Blog JetBrains Engineering Hiring Process Guide Kotlin Comes to BlueJ - The JetBrains Blog Improving Embedded Software Quality With Parasoft C/C++test, CLion, and AI - The JetBrains Blog Kodee’s Kotlin Roundup: Kotlin Turns 15, Kotlin 2.4.0, and the Kotlin Toolchain - The JetBrains Blog GitHub Copilot now an Integrated Agent in JetBrains IDEs - The JetBrains Blog JetBrains Air lands on Windows - The JetBrains Blog The Role of Static Code Analysis in Fintech Compliance Kotlin Notebook Sunset - The JetBrains Blog Open-Sourcing the LSP Client API in IntelliJ IDEA 2026.2 - The JetBrains Blog The Dev Containers Story: Introducing EelApi for Plugin Authors - The JetBrains Blog Cursor's $60B Acquisition - Qodana Codex is now the recommended agent in JetBrains IDEs - The JetBrains Blog SSH Connections Are Moving to JetBrains Daemon in the Toolbox App 3.6 EAP - The JetBrains Blog Your AI Agent Keeps Missing The Real Bottleneck. JetBrains Rider Can Fix It Now. - The JetBrains Blog Rust Web Development 2026: The Problems Nobody Talks About Our Research on Membership Inference Attacks and Preventing Privacy Leaks - The JetBrains Blog Explicit Lazy Imports Are Coming to Python 3.15 - The JetBrains Blog Kotlin Toolchain 0.11: The Next Step for Amper - The JetBrains Blog YouTrack Helpdesk Now Includes Customer Groups - The JetBrains Blog How to Win a Hackathon: Notes From the Judging Table - The JetBrains Blog How We Measure the ROI of JetBrains IDEs - The JetBrains Blog AWS Image Builder Plugin for TeamCity - The JetBrains Blog PHP Version Migration | Jetbrains Qodana Bamboo End of Life: How to Prepare and Choose the Right CI/CD Replacement - The JetBrains Blog Structuring IntelliJ Plugins with Optional Content Modules - The JetBrains Blog YouTrack Security Update: Upgrade Required for YouTrack Server - The JetBrains Blog Qodana Is a Finalist in the 2026 CODiE Awards for Best DevOps Tool - The JetBrains Blog JetBrains Marketplace Ecosystem Security Update: Addressing Malicious Third-Party AI Plugins - The JetBrains Blog Your JetBrains IDE Expertise, Now on LinkedIn - The JetBrains Blog The JetBrains AI Coding Agent moves to general availability Step Rejection Fine-Tuning: Squeezing More Signal from Noisy Agent Trajectories - The JetBrains Blog The Anthropic Debate - The Qodana Blog dotInsights | June 2026 | The .NET Tools Blog Inside JetPride: How JetBrains Employees Built an LGBTQIA+ Community | The Life at JetBrains Blog MPS 2026.1 Release Candidate Arrives | The MPS Blog Best Python AI Frameworks in 2026 | The PyCharm Blog Contribute to the State of PHP Survey | The PhpStorm Blog The Rules of Zero, Three and Five - The Qodana Blog Modern C++ Support in CLion: What’s New | The CLion Blog Agentic AI Governance: Designing for Accountability and Control | The JetBrains AI Blog JetBrains Plugin Developer Conf 2026 – Call for Speakers | The JetBrains Platform Blog Fewer False Positives in RustRover 2026.2|The RustRover Blog Rider 2026.2 EAP 5: Code Quality Checks for Your AI Agents, and More. | The .NET Tools Blog Why Zig Isn’t 1.0 (Yet) | The JetBrains Blog Java Annotated Monthly – June 2026  | The IntelliJ IDEA Blog IntelliJ IDEA 2026.1.3 Is Out! | The IntelliJ IDEA Blog RustRover at RustWeek 2026 | The RustRover Blog WPF Hot Reload Is Here: Edit Your XAML and Watch It Update Live in Rider | The .NET Tools Blog Kotlin 2.4.0 Released | The Kotlin Blog IntelliJ IDEA 2025.3.6 Is Out! | The IntelliJ IDEA Blog Async VFS Content Writes - What Plugin Authors Need to Know | The JetBrains Platform Blog Top Agentic Frameworks for Building Applications 2026 | The PyCharm Blog Toolbox App 3.5: Better Remote Development Observability, More Reliable Enterprise Configuration, and Smoother Everyday Interactions | The Toolbox App Blog Stop Pasting Tokens: OAuth2 Login for JetBrains IDE Plugins | The JetBrains Platform Blog Fix Common TypeScript Issues | The Qodana Blog Mellum2 Goes Open Source: A Fast Model for AI Workflows | The JetBrains AI Blog What Does It Actually Take for an IDE to Understand Rust? Hibernate 7.4 New Features | The IntelliJ IDEA Blog How We Use AlphaEvolve to Make Complex IDE Algorithms Faster | The JetBrains AI Blog JetBrains Academy – May Digest | The JetBrains Academy Blog TeamCity 2026.1.1 Is Now Available | The TeamCity Blog The Upcoming Sunset of DataSpell | The DataSpell Blog Deprecating dotMemory Unit | The .NET Tools Blog Koog 1.0 Is Out: Stable Core, Better Interop, and Multiplatform Observability | The JetBrains AI Blog Introducing the Cloud9 JetStream Theme for JetBrains IDEs | The JetBrains Blog Build a Live Object Detection App for the Reachy Mini With TensorFlow and PyCharm | The PyCharm Blog IntelliJ IDEA 2026.2 EAP Is Open | The IntelliJ IDEA Blog How AI Agents Can Work with TeamCity | The TeamCity Blog
Natvis Comes to Linux and macOS: Visualize Your C++ Types Without Writing a Single Data Formatter - The JetBrains Blog
Sasha Korepanov · 2026-07-06 · via The JetBrains Blog
Dotnet logo

Essential productivity kit for .NET and game developers

.NET Tools Rider

If you’ve ever debugged your own C++ containers, strings, or hash tables on Linux or macOS, you know the deal: to see anything useful in the debugger, you have to write a custom data formatter. And writing a good data formatter is genuinely painful. Often, the formatter ends up longer and harder to follow than the class it’s supposed to explain.

Starting in Rider 2026.2, you no longer have to. Natvis now works on Linux and macOS, not just Windows. You describe how your type should look in a few lines of XML, and Rider’s debugger does the rest.

Let us show you why that matters.

A class, and the formatter it deserves

Here’s a simple stack. Nothing exotic – a size, a capacity, and a pointer to some data:

template <class T>
class MyStack {
public:
    MyStack() = default;
    MyStack(const MyStack&) = delete;
    MyStack& operator=(const MyStack&) = delete;
    ~MyStack() { delete[] m_data; }


    void Add(T value) {
        if (m_data == nullptr) {
            m_capacity = 4;
            m_data = new T[m_capacity];
        } else if (m_size >= m_capacity) {
            m_capacity *= 2;
            T* new_data = new T[m_capacity];                
            for (size_t i = 0; i < m_size; ++i) {
                new_data[i] = m_data[i];
            }                
            delete[] m_data;
            m_data = new_data;
        }
        m_data[m_size++] = value;
    }

private:
    size_t m_size{0};
    size_t m_capacity{0};
    T* m_data{nullptr};
};

Let’s add some elements to see what the debugger shows.

MyStack<int> stack;
stack.Add(1);
stack.Add(2);
stack.Add(3);

Out of the box, the debugger will show you something like this: 

You get the size, the capacity, and exactly one element. The other two are out there in memory somewhere, but the debugger has no idea they exist.

To see the whole stack, you need a data formatter. It looks like this… 🫠

import lldb

# ---------------------------------------------------------------------------
# MyStack<T>
# ---------------------------------------------------------------------------

class MyStackSyntheticProvider:
    def __init__(self, valobj, internal_dict):
        self.valobj = valobj.GetNonSyntheticValue()
        self.size = 0
        self.capacity = 0
        self.data = None     
        self.element_type = None
        self.element_size = 0

    def update(self):
        try:
            self.size = self.valobj.GetChildMemberWithName('m_size').GetValueAsUnsigned(0)
            self.capacity = self.valobj.GetChildMemberWithName('m_capacity').GetValueAsUnsigned(0)
            self.data = self.valobj.GetChildMemberWithName('m_data')

            ptr_type = self.data.GetType()
            self.element_type = ptr_type.GetPointeeType()
            self.element_size = self.element_type.GetByteSize() or 1

            if self.data.GetValueAsUnsigned(0) == 0:
                self.size = 0
        except Exception:
            self.size = 0
            self.capacity = 0
            self.data = None
        return False

    def num_children(self):
        return 2 + int(self.size)

    def get_child_index(self, name):
        if name == '[size]':
            return 0
        if name == '[capacity]':
            return 1
        if name.startswith('[') and name.endswith(']'):
            try:
                return 2 + int(name[1:-1])
            except ValueError:
                return -1
        return -1

    def get_child_at_index(self, index):
        if index < 0 or index >= self.num_children():
            return None

        if index == 0:
            return self.valobj.CreateValueFromExpression('[size]', str(self.size))
        if index == 1:
            return self.valobj.CreateValueFromExpression('[capacity]', str(self.capacity))

        elem_index = index - 2
        offset = elem_index * self.element_size
        return self.data.CreateChildAtOffset('[{}]'.format(elem_index), offset, self.element_type)

    def has_children(self):
        return True


def my_stack_summary(valobj, internal_dict):
    non_synth = valobj.GetNonSyntheticValue()
    size = non_synth.GetChildMemberWithName('m_size').GetValueAsUnsigned(0)
    capacity = non_synth.GetChildMemberWithName('m_capacity').GetValueAsUnsigned(0)

    if size == 0:
        return 'empty stack'
    return 'size={}, capacity={}'.format(size, capacity)

# ---------------------------------------------------------------------------
# Registration
# command script import MyTypesDataFormatters.py 
# ---------------------------------------------------------------------------

def __lldb_init_module(debugger, internal_dict):
    cat = 'my_types'
    mod = __name__ 

    debugger.HandleCommand('type category define {}'.format(cat))

    # MyStack<T>
    debugger.HandleCommand(
        'type summary add -x "^MyStack<.+>$" '
        '-F {mod}.my_stack_summary -w {cat}'.format(mod=mod, cat=cat))
    debugger.HandleCommand(
        'type synthetic add -x "^MyStack<.+>$" '
        '-l {mod}.MyStackSyntheticProvider -w {cat}'.format(mod=mod, cat=cat))

    debugger.HandleCommand('type category enable {}'.format(cat))
    print('[{}] formatters loaded'.format(mod))

Click here to unfold You’ve seen enough. You can close it now.

That’s about 70 lines of Python to explain a class that’s barely longer than that. Load it into LLDB, and the debugger finally shows everything:

It works. But at what cost? You now own and maintain a formatter that’s harder to read than the type it describes – and that’s for one class. Multiply it across the dozens of types in a real project and the math gets bleak fast.

Natvis to the rescue

If you build with the MSVC toolchain on Windows, none of this is news – Natvis is the standard way to visualize types there, and Rider and CLion have supported it for years. What’s new is that the same files now work on Linux and macOS too. The Natvis you already have now works in more places.

Just take a look at how simple and easy Natvis for the MyStack<T> looks:

<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/Natvis/2010">
    <Type Name="MyStack&lt;*&gt;">
        <DisplayString Condition="m_size == 0">empty stack</DisplayString>
        <DisplayString Condition="m_size != 0">size={m_size}, capacity={m_capacity}</DisplayString>
        <Expand>
            <Item Name="[size]">m_size</Item>
            <Item Name="[capacity]">m_capacity</Item>
            <ArrayItems>
                <Size>m_size</Size>
                <ValuePointer>m_data</ValuePointer>
            </ArrayItems>
        </Expand>
    </Type>
</AutoVisualizer>

Much easier, right? Just a little XML.

And if you run the debug session with this Natvis, you’ll see this:

Exactly the same (plus Raw View, but you may always remove it using the HideRawView attribute)!

What Natvis can describe

The stack above uses <ArrayItems>, but that’s one tool of many. Natvis covers most of the data structures you actually write:

There’s plenty more in the official Natvis documentation, and a complete schema if you want to know exactly what’s valid.

Turning it on

Three steps to get Natvis working on Linux and macOS:

  1. Use LLDB. Natvis only works with LLDB. Go to File | Settings | Build, Execution, Deployment | Toolchains and confirm the Debugger setting is Bundled LLDB.
  2. Enable Natvis rendering.  it’s off by default. Go to File | Settings | Build, Execution, Deployment | Debugger | Data Views | C/C++ and turn on Enable Natvis renderers for LLDB.
  3. Point Rider at your Natvis files. The cleanest way is to add them to your CMake project, either as a source on an existing target:
add_executable(example main.cpp src1.cpp MyNatvis.Natvis)

Or you can create a new custom target specifically for Natvis files

add_custom_target(MyVisualizers SOURCES MyNatvis.Natvis)

If you’d rather not touch CMake, add a folder under Additional Directories in the same Data Views | C/C++ settings page.

If everything’s set up but nothing renders, the debugger most likely hit a syntax error in a Natvis file and silently gave up. Turn on Natvis diagnostics (same settings page) and check the Debugger Output (LLDB) tab — the parse error will be there.

You probably already use Natvis

This isn’t a feature you have to start from scratch with. A lot of the C++ ecosystem already ships Natvis, much of it in game development:

If you depend on any of these, their visualizers now light up in Rider on Linux and macOS with no extra effort from you.

What works, and what’s still coming

Honesty about the edges. Under the hood, our Natvis support is itself a set of advanced LLDB data formatters that parse your .natvis files and lean heavily on LLDB’s expression evaluator to do it.

On Windows, that evaluator is ours. We maintain a custom fork of LLDB 9 with hundreds of patches, and in Rider 2026.1 we rewrote the expression evaluator specifically for Natvis from scratch –  the same work that made Unreal Engine variable inspection up to 87 times faster.

On Linux and macOS, we’re on upstream LLDB 21 which means none of those improvements are there yet. Natvis on these operating systems uses the standard LLDB expression evaluator instead.

For most types, that works fine. The special cases are the Natvis files that push into the most advanced features, and Unreal Engine is the prime example: its Natvis is complex enough that it doesn’t work flawlessly on Linux and macOS yet. Bringing the new Windows LLDB 9 evaluator over to LLDB 21 is on the roadmap, but it’s a big piece of work. For now, you’re welcome to try Unreal Engine Natvis on those platforms – just expect some rough edges. And the existing Unreal Engine LLDB data formatters still work there too, so if you enable Natvis on an Unreal Engine project, the two run side by side.

Already have your own data formatters? Keep them.

If you’ve written LLDB data formatters that work well for you, Natvis won’t step on them. Natvis has the lowest priority of any user-defined formatter — wherever one of your formatters already handles a type, Natvis stays out of the way. You can adopt it gradually, type by type, without throwing anything away.

Try it

Natvis on Linux and macOS is available in Rider 2026.2. Point it at the Natvis files you already have, flip the two settings discussed above, and watch your types start making sense.

Helpful links

Subscribe to a monthly digest curated from the .NET Tools blog:

Discover more