Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for collecting dumps on crash #6438

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Conversation

dibarbet
Copy link
Member

This adds an option to easily capture a crash dump of the language server process.

  1. A vscode option is generally easier than manually trying to launch vscode with a specific set of environment variables
  2. There have been a couple reports where manually setting the env vars isn't easy to do (for example wsl where the code server process is not directly launched by the user) - e.g. [BUG] Workspace update handlers close due to JSON-RPC connection lost microsoft/vscode-dotnettools#522

@dibarbet dibarbet requested a review from a team as a code owner September 26, 2023 20:30
env.DOTNET_DbgMiniDumpType = '2';
// Collect crashreport.json with additional thread and stack frame information.
env.DOTNET_EnableCrashReport = '1';
env.DOTNET_DbgMiniDumpName = path.join(languageServerOptions.crashDumpPath, '%e.%d.dmp');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to comment what the substitutions do here, especially because I don't see what %d does in the docs. Did you mean %p?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dibarbet dibarbet merged commit fb2e221 into dotnet:main Sep 26, 2023
8 checks passed
@dibarbet dibarbet deleted the crash_dumps branch September 26, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants