So I made a thing...

It's a VS Code extension based on Kirill Osenkov's @KirillOsenkov MS Build structured log viewer.

https://marketplace.visualstudio.com/items?itemName=lambdageek.msbuild-structured-log-viewer

The desktop version runs on CoreCLR, the https://insiders.vscode.dev version runs using the new (and still very experimental!) .NET 8 WASI workload on top of VS Code's WASI extension host (https://code.visualstudio.com/blogs/2023/06/05/vscode-wasm-wasi)

#vscode #dotnet #dotnet8 #net8 #wasi #coreclr #vscodeExtension #mono #msbuild #msbuildLogViewer #msbuildStructuredLogViewer #binlog

Experimental: MS Build Structured Log Viewer - Visual Studio Marketplace

Extension for Visual Studio Code - MS Build Structured Log Viewer displays the contens of MSBuild binary log files (.binlog) in a tree view

Pushed a big update to the MSBuild Log Viewer VS Code extension (still experimental!)

- no more emoji - use VS Code icons
- better display of search results in side view (and you can have multiple searches per binlog)
- bookmarks! pin log items in the side view
- long log entires open in real VS Code editor windows instead of in a div inside the binlog document

https://marketplace.visualstudio.com/items?itemName=lambdageek.msbuild-structured-log-viewer

#vscode #vscodeExtension #dotnet #msbuild #msbuildLogViewer #msbuildStructuredLogViewer #binlog

Experimental: MS Build Structured Log Viewer - Visual Studio Marketplace

Extension for Visual Studio Code - MS Build Structured Log Viewer displays the contens of MSBuild binary log files (.binlog) in a tree view

@lambdageek @KirillOsenkov well there goes my hackathon idea. Looking forward to trying it out!
@KirillOsenkov @lambdageek It is crazy that Binlog viewer is not integrated into VS… I remember we wanted to add it to VSMac but was shut down by someone… :(
@davidkarlas @lambdageek I’d say on Windows it doesn’t make much sense to me because you can open the actual external viewer, not sure what the benefits are of keeping it in-IDE
@lambdageek @KirillOsenkov It is all about defaults and spreading the knowledge… Imagine new junior dev using VS only got Binlog viewer when build finished all nicely collapsed with nice miliseconds per target easy to expand and dig/search navigate to .targets file, maybe even debug Tasks… vs. what we get today which is block of text, it is supposed to be best IDE after all…
@davidkarlas @lambdageek oh like some kind of a Build tool window instead of flat output, makes sense!
@lambdageek @KirillOsenkov Exactly, no more block of text like it is 1990s
@davidkarlas @KirillOsenkov @lambdageek it did ship, but hidden, and not part of the default build experience sadly
@lambdageek @KirillOsenkov Nice! I hadn't had the time to try it, but will it also run on Linux? I recently really struggled to get the structured log viewer fully working, it sometimes just crashes.
@dr_cox1911 @KirillOsenkov I built it on Linux and a Mac. Actually the only place I haven't tried it is Windows.
@lambdageek @dr_cox1911 @KirillOsenkov Happy to report that Windows does in fact work :D

@lambdageek @KirillOsenkov

AAAA the WASI mode works so well too! I'm so excited to see an end-to-end .NET-on-WASI tool that's relevant to my day-to-day :)

@lambdageek (At least I think it does - I installed the WASI extension. How can I verify I'm running WASI only?)

@chethusk the WASI version pretty much only works on insiders.vscode.dev right now (it tries to install it for codespaces too, but it doesn't work because of some COI issues).

You can tell if it's running on CoreCLR or WASI by looking in the "MSBuild Log View" output window after you open a .binlog. if it says "opening msbuild log ... using .../dotnet" it's running on CoreCLR. If it says "opening msbuild log ... using Wasi runtime" it's the WASI version.

@lambdageek booo that's what I started thinking :) I see some chatter in the log about a wasm process sending/receiving messages - I'm guessing that's a backend implementation detail then?

@chethusk That's the log lying 😈

I need to change the logging strings to say "backend" instead of "wasm".

This whole project started out as wasm-first (mostly to see what was possible). The desktop version came later

@chethusk @lambdageek @KirillOsenkov Let’s go WASI! Although I heard it’s been moved to .NET 9 at this point.
@chethusk @lambdageek @KirillOsenkov Being able to run .NET in the vscode.dev context it pretty powerful. Very exciting! Maybe https://github.dev/ will be next to work?

@jlaban @chethusk @KirillOsenkov It does kind of work on github.dev already, but cross-origin isolation isn't on by default, so you have to append `?vscode-coi=on` to every URL.

for example:
https://github.dev/lambdageek/MSBuildStructuredLog?vscode-coi=on