question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot navigate between symbols in the same decompiled file

See original GitHub issue

Environment data

dotnet --info output: .NET SDK (reflecting any global.json): Version: 5.0.302 Commit: c005824e35

Runtime Environment: OS Name: Windows OS Version: 10.0.18363 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\5.0.302\

Host (useful for support): Version: 5.0.8 Commit: 35964c9215

.NET SDKs installed: 2.2.402 [C:\Program Files\dotnet\sdk] 5.0.100 [C:\Program Files\dotnet\sdk] 5.0.302 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.All 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

VS Code version: 1.60.2 C# Extension version: 1.23.16

OmniSharp log

[warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService
        No document found. File: $metadata$\Project\QT\API\MultiOfferingWrite\WebApi\Assembly\Newtonsoft\Json\Symbol\Newtonsoft\Json\JsonConvert.cs.

Steps to reproduce

  1. Enable decompilation by adding the following settings into %USERPROFILE%/.omnisharp/omnisharp.json
    "RoslynExtensionsOptions": {
        "enableDecompilationSupport": true
    }
  1. Hit <kbd>F12</kbd> to decompile JsonConvert.DeserializeObject() in
var entitlements = JsonConvert.DeserializeObject<EntitlementClaimItem[]>(claimEntitlements.Value);
  1. it shows up the decompiled file [metadata] JsonConvert.cs which is good.
        [DebuggerStepThrough]
        public static T DeserializeObject<T>(string value)
        {
            return JsonConvert.DeserializeObject<T>(value, (JsonSerializerSettings?)null);
        }
  1. When clicking on DeserializeObject in return JsonConvert.DeserializeObject<T>(value, (JsonSerializerSettings?)null);, the above warning message shows up in the OmniSharp log. image Hitting <kbd>F12</kbd> to further decompile DeserializeObject in return JsonConvert.DeserializeObject<T>(value, (JsonSerializerSettings?)null); results in pop up showing that warning message as below image

  2. But if clicking on JsonSerializerSettings in return JsonConvert.DeserializeObject<T>(value, (JsonSerializerSettings?)null);, even the above warning message also shows up in the OmniSharp log, image but hitting <kbd>F12</kbd> to further decompile JsonSerializerSettings actually succeeds without issues in this case. image

Expected behavior

Should be able to further decompile the from the decompiled code.

Actual behavior

Looks like many objects aren’t able to be further compiled successfully from the decompiled code, while a few are able to. So the user experience isn’t good. When i use ILSpy directly to decompile the same DLLs there’s no problem.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
coeyescommented, Dec 18, 2021

Hi. Two months have passed since the issue was registered. Actually, this bug occured since 1.23.13 (Juy 13th, 2021). Any progress?

0reactions
cateyes99commented, Apr 29, 2022

Close it as the PR has been merged😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Decompile source to symbol file fails
I am encountering the below error when I try 'Decompile Source to Symbol File' (from Modules window) for the code deployed to my...
Read more >
Navigate To: Sources from Symbol Files - ReSharper - JetBrains
Choose Tools | Options from the menu and then go to Debugging | Symbols page. On the Symbols page, click the folder icon,...
Read more >
IntelliJ shows decompiled .class file instead of source code
Java Bytecode Decompiler plugin is off. Platform, Project and Module all have same JDK version setup. I have two JDKs available in IntelliJ: ......
Read more >
Decompilation of C# code made easy with Visual Studio
No Symbols Loaded/Source Not Found · Break into code from a breakpoint or exception. · Step into code. · Switch to a different...
Read more >
Unable to step into code decompiled by Reflector
If it is, please try clearing the pdb cache (.NET Reflector> Clear the cache) and then reenable debugging to recreate the pdb file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found