News for hackers. Stuff that matters.
Re:Show HN: I've built ORM-ish library using dotnet source g... by CharlieDigital on Friday March 08, 2024 @10:23AM (#39641854)

    > That way, I was able to use debugger to understand AST provided by Roslyn and quickly iterate.
Interesting; would love to see a video of your workflow and process.

With VSC, I found that I had to do some "hacks" to drop output as comments into a generated file so I could see what was happening.

Re:Show HN: I've built ORM-ish library using dotnet source g... by dgpy on Friday March 08, 2024 @11:22AM (#39642588)
General usage is as in this short video: https://streamable.com/3oqxhf

`QueryGeneratorTestUtil.GenerateCompileAndAssert` internally uses `Microsoft.CodeAnalysis.CSharp.CSharpCompilation.Create()` and `Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.Create()`. I get an interactive, debuggable source generator development environment this way. Same as you, initially I used "comments as debugging" hacks but above way is way more efficient.