KirillOsenkov / MSBuildStructuredLog

A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values.
MIT License
1.42k stars 188 forks source link

Go from Source to Log #590

Closed magol closed 1 week ago

magol commented 2 years ago

I want to make it possible to from source code find in the Log when this code was run. If the code never has been run, it should found the Target. If the code has been run multiple times, you should get a list of possible locations.

KirillOsenkov commented 2 years ago

Unfortunately this is very tricky or maybe even impossible to implement as you'd need an MSBuild parser/language service to understand what construct the caret is currently in. It's much easier for a human to see that we're in a target or a task, and just search for that. For evaluation, there isn't even a place in the tree that we could go to.