Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to use Java Debug in TOS. The source debug works, and I can set a regular breakpoint, but if I try to set a conditional breakpoint, or if I try to inspect or watch a variable, I get evaluation errors. For inspect, the error is: "Evaluations must contain either an expression or a block of well-formed statements". For a watch, the error is <error(s)_during_the_evaluation>. I believe that the problem is that the dialogs automatically surround the expression or variable name that I either selected or typed with double quotes. This makes the entry a string rather than an expression to evaluate. This error does not happen with plain vanilla Eclipse.
Is there a workaround for this?
I can see the variables in the Variables panel, but it is so long that it takes 20 or thirty seconds to update every time I step to a new line of code. This is not an option. I can pull a variable name out of the Variables tab and inspect it which drops that one variable into the Expressions tab without the double quotes. That works fine. But there is no watch equivalent, and conditional breakpoints seem to be plagued with the same error. This means there is no way to run through 1000 rows without setting a breakpoint and clicking the mouse 1000 times, and if you get complacent and miss the one problem row in that first 1000, you have to keep clicking until it comes up again. This is a big issue.
Can you give me an example of a component you have set up where this error occurs? The reason I am asking is that you said....
"I believe that the problem is that the dialogs automatically surround the expression or variable name that I either selected or typed with double quotes. This makes the entry a string rather than an expression to evaluate."
The code you will be looking at is Java. If this code is shown within quotes, it will be a String as far as Java is concerned and would never be used as code. This problem *could* be caused by adding quotes where they shouldn't be used in a component, the usage of a field that is only intended for a String (unlikely...but possible)....it could be something else. But I will need to try to recreate this to identify this.
Yes I can help you recreate this.
In trying to recreate this simply, I determined that the first method in the generated source works fine. So I don't know what the problem is anymore.
I am generally trying to debug within a tMap component, so create something with a tMap, and debug to it using Java Debug.
Here is the start of the Var scope for a tMap. (Note it is named tMap_22, but there are in reality only 3 tMap components in this job), If I try to watch the Var object (by selecting it, right clicking, and selecting Watch from the context menu), it fails, but if I try to inspect the same object (by selecting it, right clicking, and selecting Inspect from the context menu) it works. this is what I get in the Expressions view:
The double quotes around the Watch expression, and the lack of double quotes around the Inspect expression is what led me astray with the double quotes, but in the early bits of the source, I can successfully watch variables in this manner, and they have the double quotes. This is very strange.