Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 11 of 11

Thread: debug with breakpoint

  1. #1
    Member
    Join Date
    Jan 2009
    Posts
    33

    Question debug with breakpoint

    Hello!,

    I've seen that is possible set breakpoints in javascript code... Is this possivle to see line by line of this javascript code being executed when I set a breackpoint??

    I've tried to use the new debugge but I thinck that it has so mutch problems...

    Does someone known how to use this new debug??
    It is possible to debugge line by line of a javascript code??

    tks.

  2. #2
    Senior Member glg's Avatar
    Join Date
    Aug 2004
    Location
    Chicago, IL, USA
    Posts
    714

    Default

    The old style RAD Debugger can't do it, no.

    What I've done with Javascript to debug is to add print statements. You can throw them in anywhere and figure out where it's getting stuck.

  3. #3
    Senior Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    930

    Default

    The advanced debugger will allow you to debug line by line.

    what issues are you having?

  4. #4
    Senior Member mateuszk's Avatar
    Join Date
    Nov 2006
    Posts
    302

    Default

    Quote Originally Posted by harn145 View Post
    The advanced debugger will allow you to debug line
    ... although it must be said, that SC6.2 release has a problem with that.
    In my experience I've found that:

    1. it's possible to see the executed JS line numbers
    2. it's impossible to "create a window" with a specific JS lib using RAD stack trace (this was working nicely in sc6.1) and hence put a breakpoint in that lib.

    Or, maybe, I'm just missing something obvious here?

  5. #5
    Senior Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    930

    Default

    You can either pre-set a break point in any js (right click) or set it after you've run a trace on it. On break, you're one click away from the exact line and its details...

  6. #6
    Member
    Join Date
    Jan 2009
    Posts
    33

    Default

    Hello,

    I'm using SC6.1.2 and every time the following messages appear:

    ------------------------------------------------------------------------------
    The ServiceCenter Server cold not be accessed. The network connection may be dow, or your session may have timed out. Would you like to retry accessing the server? Press Yes to retry or no to reconnect.
    ------------------------------------------------------------------------------
    or
    ------------------------------------------------------------------------------
    Error: Enable to create part:
    ------------------------------------------------------------------------------

    This way I can't debugge the javascript line by line.

    Does someone known what I'm doing wrong??

    I did the following steps to test breakpoint:
    1- put the following javascript commands at ocmq.view.summary at the update event.

    system.vars.$G_teste="1"
    system.vars.$G_teste="2"
    system.vars.$G_teste="3"
    system.vars.$G_teste="4"
    system.vars.$G_teste="5" // the breakpoint is set at this line
    system.vars.$G_teste="6"
    system.vars.$G_teste="7"
    system.vars.$G_teste="8"
    system.vars.$G_teste="9"
    system.vars.$G_teste="10"

    2- pressed the start/stop the debugger
    3- updated a request record.

    Result:
    - The variable $G.test is with the value 10. So it doesn't stop at line five.
    - At the trace window there is lots of lines and between them are:
    3: <UNKNOWN> [line 1]
    3: <UNKNOWN> [line 2]
    3: <UNKNOWN> [line 3]
    3: <UNKNOWN> [line 4]
    3: <UNKNOWN> [line 5]
    3: <UNKNOWN> [line 6]
    3: <UNKNOWN> [line 7]
    3: <UNKNOWN> [line 8]
    3: <UNKNOWN> [line 9]
    3: <UNKNOWN> [line 10]

    And if I click twice in another line it shows me the javascript code. However if I click twice in a line like 3: <UNKNOWN> [line 5] the message error above is presented.


    I'm doing something wrong??

    Thanks

  7. #7
    Senior Member mateuszk's Avatar
    Join Date
    Nov 2006
    Posts
    302

    Default

    Quote Originally Posted by harn145 View Post
    You can either pre-set a break point in any js (right click) or set it after you've run a trace on it. On break, you're one click away from the exact line and its details...
    Yepp, I was doing it the wrong way.
    The catch was not to use app trace directly
    but go first to the library and set the breakpoint over there.

    After that I don't get "Unable to create part" message
    and can debug awayyyyyy.....

    Thanks.

  8. #8
    Member
    Join Date
    Jan 2009
    Posts
    33

    Thumbs up I get debugge line by line but I steel have a problem

    Thanks Mateuszk,

    I get debugge line by line at ScriptLibrary... I was coding at formatcontrol/javascript withaut a Library... in the formatcontrol the new debugger doesn't work.

    but steel have a problem, my connection is down when I stop the new debugger. It is normal??

    Thanks!!!

  9. #9
    Senior Member mateuszk's Avatar
    Join Date
    Nov 2006
    Posts
    302

    Default

    How do you stop it?
    Using the "start/stop the debugger button"?

  10. #10
    Member
    Join Date
    Jan 2009
    Posts
    33

    Default

    yes, its wrong??

  11. #11
    Senior Member mateuszk's Avatar
    Join Date
    Nov 2006
    Posts
    302

    Default

    No, that's correct.
    And yes, this is not normal.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts