Forum Discussion

AndersW's avatar
AndersW
Occasional Contributor
14 years ago

how to ignore breakpoints

I have a tendency to use breakpoints for debugging, and then forgetting to remove it again afterwards.



Then when I run a big script overnight, it pauses at one of said breakpoints and nothing is finished when I check the next morning. It is a bit annoying, and aside form trying to start remembering to remove them all, is there a way I can get TC to ignore breakpoints during a run??



Is there a piece of code I can use that will tell my mainscript to ignore any breakpoints it might encounter??

4 Replies

  • Hi Anders Wittrup




    You can disable the debugging option while running the overnight scripts. To do this, just click on "Enable Debugging" menu item from the "Debug" menu.

    While testing scripts, you can enable debugging again by clicking on "Enable Debugging" menu item from the "Debug" menu.



    Regards,

    Harshad Kashikar
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Anders,



    Also you can open the Breakpoints window (View|Debug|Breakpoints) and disable all or just selected breakpoints.
  • AndersW's avatar
    AndersW
    Occasional Contributor
    Thanks for the suggestions :)



    But then i guess there is no way of doing this through code??



    As I forget to remove breakpoints, I also forget to disable debugging.



    Basically I want the breakpoints I put in to work when I am not running my main script. But if I run the main script I would like to have it ignore any breakpoints it encounters without me having to remember to turn debugging on and off.
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Anders,



    No, it is not possible to disable breakpoints from code.

    One more possible way is to launch tests via command line with the /Silent parameter (see TC CommandLine Parameters help topic for more details) in which case all breakpoints are ignored.