JavaScript Debugging Configuration
nannette Mori (50●1●9●85)
| asked Feb 01 '18, 10:35 a.m.
edited Feb 02 '18, 3:12 a.m. by Ralph Schoon (63.6k●3●36●46)
Question:
Problem:
Below is some code that I will refer to. This code is an example of what is running on different servers and in different projects. Each instance is behaving the same way. I am running 6.0.3 server. This happens when viewing a work item using either Firefox or Internet Explorer on Windows and also using Firefox from Linux. Another user on the team sees the same behavior.
Behavior Clarification:
I can set a breakpoint in the debugger and get the execution to pause on any line within the outer function and up to and including the line beginning with "getValue: ...". If I set a breakpoint on any line after this line it will not break. When the script executes to completion, the attribute value is updated with the "Hi There" so I know the script executes to completion. If I set a breakpoint on the first console.log line ("Running Script...") The debugger shows two instances of the showHelloWorldValue.js script. One labeled (eval) and the other labeled (anonymous). Using the step debug button does not result in getting into the function. The program pointer switches from one instance to another thus resetting the program pointer back to the opening "{" of the other instance. Then it skips to the "}" before allowing both functions to go out of scope.
Code:
dojo.provide("showHelloWorldValue");
(function() {
dojo.declare(scriptName, null, {
getValue: function(attribute,workItem, configuration) {
}
})();
|
One answer
Ralph Schoon (63.6k●3●36●46)
| answered Feb 02 '18, 3:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER JavaScript code is compressed to reduce overhead or something. You need to use a special debug URL.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
I find the line
console.log("Running Script - " + scriptName);
Strange. Is it allowed to have logging out side of the function definition.