dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.87k stars 781 forks source link

Support Visual Studio Code Map #11787

Open xperiandri opened 3 years ago

xperiandri commented 3 years ago

To understand complex solutions or debug complex code it is nice to be able to present it visually. Visual Studio has an excellent Code Map feature but dropping F# solution or files onto a Code Map surface has no effect.

Describe the solution you'd like

Full support of Code Map generation and debugging on Code Map.

Additional context

Tested in Visual Studio Enterprise 2019 16.10.3

dsyme commented 3 years ago

It would be interesting to understand the technical basis of what is required here, and which parts are in dotnet/project, and which parts in PDB or IL generation, and which parts require more specific Roslyn-like work

xperiandri commented 3 years ago

@Pilchie do you know who owns this feature and can point to what is required for that?

xperiandri commented 3 years ago

@davkean, @srivatsn, maybe you have something to say or redirect to someone?

davkean commented 3 years ago

These features are typically built on top of CodeModel, https://docs.microsoft.com/en-us/dotnet/api/envdte.codemodel?view=visualstudiosdk-2019, which F# does not provide.

dsyme commented 3 years ago

These features are typically built on top of CodeModel, https://docs.microsoft.com/en-us/dotnet/api/envdte.codemodel?view=visualstudiosdk-2019, which F# does not provide.

If we wanted to play with this, which component in our implementation should provide this ? Could you point us to the Roslyn implementation?

Thanks!

davkean commented 3 years ago

SDK-based projects talk to Roslyn through this: https://github.com/dotnet/project-system/blob/main/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/LanguageServices/ProjectContextCodeModelProvider.cs#L71.

xperiandri commented 3 years ago

Is this also enough for debugging on CodeMap?