Community
Participate
Working Groups
First the patch: Sometimes when i do see an expression comming in in the javascript debugger side (see point 2 why most of the time the expression is just empty) i see things like "var x" so including the var and so on. I looked at the code and there was code to strip it but that code was not reallly correct, the patch that is attached should fix that. Most of the time the expressions where empty, i was first looking for that why that does happen. I attached a picture where it is very clear that there is something wrong, ScriptWatchPoint has this constructor: public ScriptWatchpoint(String debugModelId, IResource resource, int lineNumber, int start, int end, String fieldName) throws CoreException { super(debugModelId, resource, lineNumber, start, end, true); this.setFieldName(fieldName); } so the field name is set after the super call, but the super call already does getFieldName (see picture) from inside the super call. This is at least incorrect java behavior (that methods of an not constructed object are already called again) but also because of that the expression isn't constructed right. So as far as i can see the fire of breakpoint created (or adding of the breakpoint to the breakpoint manager) shoudn't be done in the breakpoint itself. But always from the outside world after the constructor call.
Created attachment 79140 [details] creating the right watch expression
Created attachment 79141 [details] the public method call when still constructing the object.
Hi Johan, thank you for exploring this, patch applied and I'll take care of Breakpoint ctors.
bulk version set: 0.95
constructor behavior is already refactored