This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Fix Expression Evaluation upon Hovering
Partial fix: changeset: 90897:3b300895e2d8 description: Make web.client.tools.impl module a friend module. changeset: 90898:f30eee0c12bc files: web.client.tools.impl/nbproject/project.xml web.client.tools.impl/src/org/netbeans/modules/web/client/javascript/debugger/ui/ToolTipAnnotation.java description: Partial fix for issue# 140834 - Expression Evaluation upon Hovering Use method provided by Tor to compute the expressions at the cursor position. The expressions like: ,this.prop // no space array[0].prop // array dereference are still not working.
After discussions with Tor, he addressed the following scenario also - call expression preceded by , or unary operator. Example: ,this.currentWidth or !this.currentWidth Other scenario which doesn't work is - call expression containing () or []. Example: array[0].prop or document.getElementById("fisheye_menu").id Here is Tor's suggestion(taken from his email) ---------------- If your code can use parse information (which can be much slower, e.g. perhaps 200-600 ms) then we should be able to do something similar; it will parse the code, get an AST, use the lex information and the parse information to find the expression beginning, and pull out the document contents from the start to end regions. HOWEVER -- I've worked on debuggers in the past, and one thing we never did was evaluate expressions by flyover (only over selected text). The reason for that was that executing code could be dangerous -- not just if it's calling System.exit(), but if it's deleting files or has other unintended side effects. Perhaps in JavaScript this is much less of a big deal since it's typically not going to cause problems in a sandboxed webapp? ---------------- I do not think we will be able to address it in 6.5, however, we should document this
A new implementation of JavaScript debugger is in trunk. Closing old issues.