Debugger Question - Stop if value e.g. integer is 1

infonoteinfonote Member Posts: 233
Is there a built-in function to stop the debugger if a value is a certain amount e.g. integer is a certain number?

A sort of dynamic break-point which stops only if it is a certain value?

Thanks in advance.

Comments

  • kapamaroukapamarou Member Posts: 1,152
    Wouldn't that be great!!! :D

    No. There isn't.

    But you can actually add it in the code if it is for testing... :wink:
  • infonoteinfonote Member Posts: 233
    Yes it would be great. Of course you can add an IF statement in the code and put a breakpoint in there. I was just curious to see if there is a built-in function.

    Thanks a lot
    kapamarou wrote:
    Wouldn't that be great!!! :D

    No. There isn't.

    But you can actually add it in the code if it is for testing... :wink:
  • David_SingletonDavid_Singleton Member Posts: 5,479
    This would be a wonderful feature.
    kapamarou wrote:
    But you can actually add it in the code if it is for testing... :wink:
    You can't really. Say for example you are working too find when a particular field in a table is populated with a particular value. There might be 20 different places in the code where the field is updated, (a good example is when trying to find an issue with whse. shipping and available quantity or if you are trying to work out why Navision planning engine is suggesting the purchase of a certain qty of an item), if you knew all the places it might happen you wouldn't need the debugger. Its finding that one bit of hidden code that takes all the time.

    It would be great to tag the Sales Line for example, and have the debugger break when (for example) Quantity > 0 etc.
    David Singleton
  • DenSterDenSter Member Posts: 8,304
    It would be great to have watch functionality where you can set values to look for. It would also be great to have an immediate window where you can manipulate values at debug time, and you can move the debug cursor.

    I am not holding my breath :mrgreen:
  • ta5ta5 Member Posts: 1,164
    Hi Daniel
    You have used .NET environment to many times I guess :-$
  • ara3nara3n Member Posts: 9,256
    DenSter wrote:
    I am not holding my breath :mrgreen:

    That's good. Because it will be world record if you do. :mrgreen:
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • DenSterDenSter Member Posts: 8,304
    ta5 wrote:
    You have used .NET environment to many times I guess :-$
    Actually those were capabilities of the MS Access VBA debugger that was included in Office 95, almost 15 years ago, way before .NET
  • kapamaroukapamarou Member Posts: 1,152
    You can't really. Say for example you are working too find when a particular field in a table is populated with a particular value.

    Of course.
    I didn't mean that the debugger would become powerful with this trick. But it is useful when you need for example to stop a batch process at a specific point for a specific item that will come after hundreds of loops. You don't want to place a breakpoint and stop so many times until you reach item X and then... accidentally hit F5 again... #-o
  • David_SingletonDavid_Singleton Member Posts: 5,479
    kapamarou wrote:
    You can't really. Say for example you are working too find when a particular field in a table is populated with a particular value.

    Of course.
    I didn't mean that the debugger would become powerful with this trick. But it is useful when you need for example to stop a batch process at a specific point for a specific item that will come after hundreds of loops. You don't want to place a breakpoint and stop so many times until you reach item X and then... accidentally hit F5 again... #-o


    Ah yes I understand, yes that I also do.
    David Singleton
Sign In or Register to comment.