Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Who is this extension for #103

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Who is this extension for #103

wants to merge 3 commits into from

Conversation

exapsy
Copy link

@exapsy exapsy commented Dec 17, 2020

Hey, for first amazing work! Great job!

I just run into a small time investment issue when I wanted to tried to integrate this extension into my workflow. I had no knowledge of how to use the extension, nor the description makes it quite clear to be fair. :P

After spending some time, I found out that the extension requires you to write code that is dedicated to this extension, instead of going vica versa. I found out about this after I started using the extension and spending some time with it, because I simply had no idea how it works. So, I concluded that it wouldn't be of use at the current time for the purpose I wanted it.

The point is, that I've realized this extension wasn't for me after I've spend some hours with it. We could improve this with some description on the README.

Please feel free to improve the description, or any grammar mistakes I might have done! :) Great work once again.

@hediet
Copy link
Owner

hediet commented Dec 17, 2020

Thanks for this PR. I'm sorry that this extension didn't help you so far.

However, I have to disagree that this extension is not for professional use.
While its professional use case might be narrow, I used especially the grid, text, AST and the upcoming HTML visualizer for professional debug sessions.

for the purpose I wanted it.

Can you describe your purpose? Maybe I can help you.
There is a data extraction framework that can be extended without really changing the code that you want to debug.

@exapsy
Copy link
Author

exapsy commented Dec 17, 2020

Can you describe your purpose? Maybe I can help you.

Sure! I'm not doing anything too specific, my use is to use it like I would use a debugger in Golang tests and such, in a codebase that is not supposed to have any debug-visualizer specific code.

My problem currently, is that I dont find any convenient way of using the extension, without having specialized functions inside the codebase that return an extension-friendly json format. Plus the code kinda has to revolve around the extension, which is a deal-braker. And from what I've seen in the examples and videos so far, that was the only way to use the extension for me so far.

There is a data extraction framework that can be extended without really changing the code that you want to debug.

Please tell me about it. That could actually turn out to be quite helpful!

@hediet
Copy link
Owner

hediet commented Dec 17, 2020

I see that you are using go. Indeed, the support for JavaScript based languages is much better.
It is currently not really possible to non-invasively visualize data structures of pre-compiled languages. In JavaScript, helpers can be injected by the debugger to keep it non-invasively, but this is not so easy for compiled languages.

If you have technical ideas how to visualize stuff in go, I'd be happy to help to make this possible with this extension!

In the end it boils down to the watch window displaying some compatible json string.
Depending on the language you are debugging, some pre-processing of the expression entered into the debug visualizer and some post-processing of the watch-view output is done by the extension (technically it does not use the watch-view, just the same API the watch-view uses).
Pre-processing allows to wrap every expression into a function call of your target language that can process the value before it is sent to the watch view.
Post-processing allows to transform the value of the watch view into a compatible json string.

Currently, pre/post-processing is hardcoded in the extension and only for JavaScript non-trivial pre/post-processing is done.
If you have ideas which pre/post-processing could help to visualize values when debugging go programs, please let me know!

@exapsy
Copy link
Author

exapsy commented Dec 17, 2020

@hediet From what I see there is a generic and a js evaluation engine, where the JS I assume is supposed to use the JS data extraction engine.
So, maybe a Golang extraction engine and a Golang evaluation engine can be done?

I'll study the codebase better and see how I can help.

For now I guess I should be closing this PR. But I guess its still relevant for languages like Golang.

@hediet
Copy link
Owner

hediet commented Dec 17, 2020

So, maybe a Golang extraction engine and a Golang evaluation engine can be done?

Yes!

For now I guess I should be closing this PR. But I guess its still relevant for languages like Golang.

I don't want to merge the part that states that this extension is not for professional use. But you are right, it could be stated that this extension is difficult to use with golang and other compiled languages.

@exapsy
Copy link
Author

exapsy commented Dec 18, 2020

I changed the description to describe the difficulties with pre-compiled languages. Feel free to give any feedback :)

Edit: Even if it's the way of expression, or if you believe there's excessive information, or something that doesn't stick to this project's profile, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants