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.
The Add Watch dialog suggests to use the word under the cursor, but does so even in case something which cannot be used as a watch is there (such as Java keywords - "int", "void", "import", or numbers) Suggest to improve the check of the text under the cursor and in case it cannot be used, use empty text instead.
There is possibility to add watch on expression. And I am not sure how can I check expression correctness. This dialog is shared for more languages so Java keywords are not correct for debugging Java but may be correct for other languages. => hard to implement, not correct (we can not do real test of validity)
I am not sure I would dismiss it this quickly, the language of the source code is known, and there might be some heuristic to address the issue of adding words that do not make sense - I do not worry that much about adding expressions - i.e. a case where the user has to explicitely select part of code to add an expression - I care more about the case when there is nothing selected in the editor, and the word under the cursor is used. We can do this check when creating Java package or Java class, I do not understand why we cannot do it in Java debugger.
can not fix now, we should create some API for plugins for other languages. => RFE
Target milestone was changed from '3.4' to TBD.
Scheduling for future, currently not possible to implement.