microsoft / VSExtensibility

A repo for upcoming changes to extensibility in Visual Studio, the new extensibility model, and language server protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DebuggerVisualizers do not load when an F# project is debugged #bug

snuup opened this issue · comments

After many days of trying to get a DebuggerVisualizer working for an F# project I tried the MemoryStreamDebuggerVisualizer in these samples and found that it does not work as well. Create an F# project, with .net8.0 or net48, it does not matter, and create a MemoryStream.

sample console app - reproduction

let ms = new System.IO.MemoryStream()
System.Diagnostics.Debugger.Break()

Open the DebugerVisualizer (which appears at least!) and you get a meaningless "Could not load the custom Visualizer" message. Why on earth does VS differ between a MemoryStream instantiated in a C# project from one instantiated in an F# project? Maybe something is linked to the project type "C# projects" inside VS, I dont know. I have no clue, please fix this, I urgently need a DebuggerVisualizer for F# projects,

sample from my run

image

@snuup you can get a bit more detail. Before you click the view button when debugging attach a second VS instance to debug the "devenv.exe" that is in debug mode. Have just my code off, and break on all exceptions (minus timeout/cancel). When you hit view the 2nd VS instance should then break and give you a bit more detail about the exception. Assuming it does would love to hear what shows up after facing similar issues.

Hello @snuup! Thank you so much for contacting us. Custom Visualizers have never been supported for F# in Visual Studio, but as far as I have managed to tell there shouldn't be any reason to not support them. We are looking into it, and we'll try to determine the feasibility of adding support soon. I will let you know once F# Visualizers are enabled or why we could not do it for the time being.