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
"Display"/"Console" view for ad-hoc evaluation of javascript expressions similar to the Display view for Java #101
Comments
Watched variables are useful but not the same, actually, since they don't work for expressions with side effects. For example, if I evaluate element.appendChild(), it shouldn't be reevaluated on each step when stepping through code. Also, evaluating an expression at the console is useful in a different way because it keeps a history of the previous values of the expression and this is interleaved with log statements. |
I think what you want then is the Display view in Eclipse. However, it works only for Java code. I think we need a custom Display view which works for JavaScript code then. I'll reopen this issue and reformulate accordingly |
On a second thought, it can also be useful indeed if the Eclipse SDBG Console is extended to a real REPL display.... |
something to base the Display/Console REPL view on
Yes, JavaScript developers are used to having a real REPL in their debugger. I think sdbg should aim to be a good Java debugger and a good JavaScript debugger, since GWT programs contain both Java and JavaScript. |
something to base the Display/Console REPL view on
Unless I missed it, it looks like the sdbg console only supports displaying output written to the console. It would be useful to also be able to evaluate expression, similar to the console in a web browser.
In the remote debugging protocol, the commands are Runtime.evaluate [1] and possibly evaluateOnCallFrame [2] if you're stopped at a breakpoint.
[1] https://developer.chrome.com/devtools/docs/protocol/tot/runtime#command-evaluate
[2] https://developer.chrome.com/devtools/docs/protocol/tot/debugger#command-evaluateOnCallFrame
The text was updated successfully, but these errors were encountered: