vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Request textDocument/documentSymbol failed. Message: Value cannot be null.

Open mriehm opened this issue 4 months ago • 1 comments

Type: Bug

Issue Description

When VS Code is launched from git command line as merge tool, the following toast error displays: Request textDocument/documentSymbol failed. Message: Value cannot be null. (Parameter 'Document is null when it was required for textDocument/documentSymbol') Code: -32000 [object Object]

This is 100% reliable for me.

Steps to Reproduce

Configure VS Code as git merge tool with the following in .gitconfig:

[merge]
    tool = code
[mergetool "code"]
    cmd = code --wait --merge $REMOTE $LOCAL $BASE $MERGED

Per recommendation from here: https://code.visualstudio.com/docs/sourcecontrol/overview#_vs-code-as-git-difftool-and-mergetool

When encountering a merge conflict on git command line, run: git mergetool

Expected Behavior

VS Code launches for merging without error

Actual Behavior

VS Code launches for merging and displays the toast error in this issue description. The functional behavior of VS Code appears to be fine besides this error notification.

Logs

C# log

csharplog.txt

C# LSP Trace Logs

csharpLspLog.txt

Environment information

VSCode version: 1.100.3 C# Extension: 2.80.16 Using OmniSharp: false

Dotnet Information .NET SDK: Version: 9.0.300 Commit: 15606fe0a8 Workload version: 9.0.300-manifests.af4147de MSBuild version: 17.14.5+edd3bbf37

Runtime Environment: OS Name: Windows OS Version: 10.0.26100 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\9.0.300\

.NET workloads installed: [android] Installation Source: VS 17.14.36202.13 Manifest Version: 35.0.61/9.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.android\35.0.61\WorkloadManifest.json Install Type: Msi

[ios] Installation Source: VS 17.14.36202.13 Manifest Version: 18.4.9288/9.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.ios\18.4.9288\WorkloadManifest.json Install Type: Msi

[aspire] Installation Source: VS 17.14.36202.13 Manifest Version: 8.2.2/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json Install Type: Msi

[maui-windows] Installation Source: VS 17.14.36202.13 Manifest Version: 9.0.51/9.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maui\9.0.51\WorkloadManifest.json Install Type: Msi

[maccatalyst] Installation Source: VS 17.14.36202.13 Manifest Version: 18.4.9288/9.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maccatalyst\18.4.9288\WorkloadManifest.json Install Type: Msi

Configured to use loose manifests when installing new manifests.

Host: Version: 9.0.5 Architecture: x64 Commit: e36e4d1a8f

.NET SDKs installed: 6.0.428 [C:\Program Files\dotnet\sdk] 8.0.116 [C:\Program Files\dotnet\sdk] 8.0.206 [C:\Program Files\dotnet\sdk] 8.0.410 [C:\Program Files\dotnet\sdk] 9.0.300 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables: Not set

global.json file: Not found

Learn more: https://aka.ms/dotnet/info

Download .NET: https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
csdevkit ms-dotnettools 1.20.35 ms-dotnettools.csdevkit-1.20.35-win32-x64
csharp ms-dotnettools 2.80.16 ms-dotnettools.csharp-2.80.16-win32-x64
vscode-dotnet-runtime ms-dotnettools 2.3.5 ms-dotnettools.vscode-dotnet-runtime-2.3.5
vscodeintellicode-csharp ms-dotnettools 2.2.3 ms-dotnettools.vscodeintellicode-csharp-2.2.3-win32-x64

Extension version: 2.80.16 VS Code version: Code 1.100.3 (258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3, 2025-06-02T13:30:54.273Z) OS version: Windows_NT x64 10.0.26100 Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i9-10900 CPU @ 2.80GHz (20 x 2808)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.72GB (15.59GB free)
Process Argv --wait --merge ./testFile_REMOTE_7487.cs ./testFile_LOCAL_7487.cs ./testFile_BASE_7487.cs testFile.cs --waitMarkerFilePath C:\Users\mriehm\AppData\Local\Temp\tlR03hj1 --log ms-dotnettools.csharp=trace --crash-reporter-id bbe60715-442c-47b5-8eef-2303f4063575
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
14424-chatv2:31321273
vscaac:30438847
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
996jf627:31283433
pythonrdcb7:31303018
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
747dc170:31275177
pylancecolor:31314202
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
gendocf:31295004

mriehm avatar Jun 07 '25 00:06 mriehm