Forum Discussion

jose_pita's avatar
jose_pita
Super Contributor
12 years ago

Disable debug on script routine

A couple of days ago I inserted this function on my batch of tests ir order to disable debugging before running all my tests in order to prevent it from stopping on some forgotten breakpoint:




function disableDebugging(){


  


  DbgServices.Options.ActiveExceptions = false;


  DbgServices.Options.EnableEvents = false;


  Log.Message("asd");


}



It seemed to work for some days but now it makes no changes...



Anyone knows a better way to do this or how to solve it?



If I execute the tests by command-line will the breakpoints be ignored?



Thanks a million.

  • Hi Jose,



    If I am not mistaken, the simplest way to disable breakpoint during test run from the command line is using parameter /SilentMode.
  • karkadil's avatar
    karkadil
    Valued Contributor
    DbgServices has nothing common with debugging scripts.



    With DbgServices "you can trace events that occur in the application under test and post information about them to the test log" (quote from Help). In order to do this, you need to run your application in Debug mode (see Run Mode on the TestedApps screen).



    As for your question why it worked previously and now it doesn't, I believe your scripts simply were lucky not to stumble on a breakpoint.
  • jose_pita's avatar
    jose_pita
    Super Contributor
    OK, now I tried to run the tests through testexecute and it is OK.



    So the question remains, what happened to the function? Shoudn't it be working?
  • karkadil's avatar
    karkadil
    Valued Contributor
    Hi Jose,



    If I am not mistaken, the simplest way to disable breakpoint during test run from the command line is using parameter /SilentMode.
  • jose_pita's avatar
    jose_pita
    Super Contributor
    Yes, I got that working with a bat file, but I wanted to know what happened to the function that I posted, because, it was working and now it isn't.... Mystery :)
  • jose_pita's avatar
    jose_pita
    Super Contributor
    Well, that's....weird :) Guess I just got lucky.



    Thanks a lot anyway.



    Keep up the good work!