From our social channels

Posts

Cards we have shared on LinkedIn, Instagram and our other channels, with a short summary and a link to the article each one is based on. The ideas and code belong to the original authors.

  • dotnetdevs.io card: Make your .NET app capture its own memory dump. Steps: ThreadPoolWatcher probe task runs late; Windows MiniDumpWriteDump (dbghelp.dll); Linux createdump --full; open fulldump-<pid>.dmp in Visual Studio. Source: Aaron Powell, .NET Blog.

    Make your .NET app capture its own memory dump

    A background watcher queues a small probe task on the thread pool every few seconds. If the probe runs late, the pool is probably starved, so the app writes a full memory dump of itself: MiniDumpWriteDump from dbghelp.dll on Windows, the runtime's createdump tool on Linux. You can then open the dump in Visual Studio and look at call stacks and the Parallel Stacks view.

    Worth knowing: Full dumps are large and can contain secrets such as tokens and connection strings, so the article recommends a restricted directory, a cooldown and a file limit. On Linux, container and ptrace permissions may need adjusting.

Summaries are dotnetdevs.io commentary written from the linked articles.