Home Image-Pro Automation (Macros, Apps, Reports)

Debugging

Hello

I'm having some trouble with the debugger in 9.04. I have a macro layout something like this

Public Function1

' Some code

End Function

Public Function2

' Some code

End Function

Sub Startpoint

       Function1

       Function2

End Sub

It doesn't seem to matter where I put the breakpoints they are ignored I also cannot get the debugger to start in the function I want, it always defaults to the first function. I've tried moving the Sub to the top of the list but it doesn't appear to help. Is there an order that Subs and Functions should be in and how do I get it to debug a specific function.

Any help appreciated

David

 

Best Answer

  • edited November 2013 Answer ✓
    Hi David,

    I just tested in 9.0.4 and everything is working properly. How do you start debugging? If you use the Play button (or F5) the execution starts from the function with cursor, so you have to click on a line in the function you want to start and then press F5.
    Execution can start from any function if you call it from the menu (function list in the Macro explorer - select Run in context menu).

    Here is my test:

    Public Function  Function1
        Dim a =1
    End Function
    
    Public Function Function2
        Dim b=2
    End Function
    
    Sub Startpoint
       Function1
       Function2
    End Sub

    Regards,

    Yuri

Answers

  • edited November 2013

    Hi David,

    You should "Load" (Project ribbon group -> Load) project first and then set the breakpoints after that.

    Nikita.

  • Hello Yuri/Nikita

    I'd not tried starting it from Macro explorer, this seems to work. I'd tried all of your other suggestions already as that's how I expected it to work but it seems to start randomly from anywhere. If I close down Premier and restart it then it behaves for a few debugs then stops working. I'm pretty sure its something in the way I'm debugging but I just can't pin down what sequence of events causes the problem. In the meantime I'll start all debugging from the macro explorer as that works.

    Thanks

     

    David

Sign In or Register to comment.