(
context: vscode.ExtensionContext,
getDotnetInfo: (dotNetCliPaths: string[]) => Promise<DotnetInfo>,
shouldIncludeMonoInfo: boolean,
logChannels: vscode.LogOutputChannel[],
dotnetResolver: IHostExecutableResolver,
monoResolver?: IHostExecutableResolver
)
| 11 | import { commonOptions, LanguageServerOptions, languageServerOptions } from './options'; |
| 12 | |
| 13 | export default async function reportIssue( |
| 14 | context: vscode.ExtensionContext, |
| 15 | getDotnetInfo: (dotNetCliPaths: string[]) => Promise<DotnetInfo>, |
| 16 | shouldIncludeMonoInfo: boolean, |
| 17 | logChannels: vscode.LogOutputChannel[], |
| 18 | dotnetResolver: IHostExecutableResolver, |
| 19 | monoResolver?: IHostExecutableResolver |
| 20 | ) { |
| 21 | // Get info for the dotnet that the language server executable is run on, not the dotnet the language server will execute user code on. |
| 22 | let fullDotnetInfo = ''; |
| 23 | try { |
| 24 | const info = await dotnetResolver.getHostExecutableInfo(); |
| 25 | const dotnetInfo = await getDotnetInfo([dirname(info.path)]); |
| 26 | fullDotnetInfo = dotnetInfo.FullInfo; |
| 27 | } catch (error) { |
| 28 | const message = error instanceof Error ? error.message : `${error}`; |
| 29 | fullDotnetInfo = message; |
| 30 | } |
| 31 | |
| 32 | let monoInfo = ''; |
| 33 | if (shouldIncludeMonoInfo && monoResolver) { |
| 34 | monoInfo = await getMonoIfPlatformValid(monoResolver); |
| 35 | } |
| 36 | |
| 37 | const csharpExtVersion = context.extension.packageJSON.version; |
| 38 | const useOmnisharp = commonOptions.useOmnisharpServer; |
| 39 | const extensionsTable = generateExtensionTable(); |
| 40 | const optionsTable = generateOptionsTable(); |
| 41 | const logInfo = await getLogInfo(logChannels, context); |
| 42 | |
| 43 | const body = `## Issue Description ## |
| 44 | ## Steps to Reproduce ## |
| 45 | |
| 46 | ## Expected Behavior ## |
| 47 | |
| 48 | ## Actual Behavior ## |
| 49 | |
| 50 | `; |
| 51 | |
| 52 | const userData = `### Logs ### |
| 53 | |
| 54 | ${logInfo} |
| 55 | |
| 56 | ## Environment Information ## |
| 57 | **VSCode version**: ${vscode.version} |
| 58 | **C# Extension**: ${csharpExtVersion} |
| 59 | **Using OmniSharp**: ${useOmnisharp} |
| 60 | |
| 61 | ${monoInfo} |
| 62 | <details><summary>Dotnet Information</summary> |
| 63 | ${fullDotnetInfo}</details> |
| 64 | <details><summary>Visual Studio Code Extensions</summary> |
| 65 | ${extensionsTable} |
| 66 | </details> |
| 67 | <details><summary>C# Settings</summary> |
| 68 | ${optionsTable} |
| 69 | </details> |
| 70 | `; |
no test coverage detected