|
|
|
|
|
by donadigo
895 days ago
|
|
Hey, looks like we had the same idea! I've run into the same issue and wanted to stop building debug UI's that do the same thing. In my case, I went to implement this for Windows, but bit more advanced with inline scripting support. Basically, you insert a snippet anywhere in the code that can call various functions and one of them is `view()` which will show all locals (or a chosen object out of scope) in a Visual Studio window (it's a VS extension [0], website [1]). Calling it again will update the view with the new state. The scripting language underneath is Angelscript and it understands symbols inside your entire project (e.g you could do `view(Namespace::g_variable)` or even call functions from the program etc.
The snippet hook is then JIT'ed into the target function by relocating it using info from the PDB. This took me ~1y to implement, and it's still a research phase project. [0] https://marketplace.visualstudio.com/items?itemName=donadigo... [1] https://d-0.dev/ |
|