Breakpoints does not trigger

miccetmiccet Member Posts: 3
Sorry for this newbie question, I'm relatively new using this system. I searched through the other posts about debugging, but they don't quite cover what I'm after.

I have a web application that is running NAV as a backend. I would like to use the debugger to check that values are okay and that it reaches the points it should. I set a breakpoint in the codeunit and put the debugger to active. Nothing happens though when I run the code.
I have noticed that if I turn on the "Breakpoints on Triggers" option it does halt, but relatively far off since the code drills down into several functions. I can set breakpoints in this "mode" and it works fine, but I can't quite get where I need to be directly. Is there a way to do this? Or alternatively to be able to set the breakpoints in the debugging mode that appears when I use triggers as breakpoints?

Thanks

Comments

  • DenSterDenSter Member Posts: 8,305
    If you set a breakpoint, and it doesn't stop at your breakpoint, then the code that has the breakpoint doesn't get executed. Maybe try setting a breakpoint at the first statement of the code in that particular function and try again. If that doesn't work, go to where the function is called and set a breakpoint the statement before the function call, keep trying until you find a point where a breakpoint will catch. It should catch it no matter if you turn breakpoint at triggers on or off.
  • miccetmiccet Member Posts: 3
    I think the problem is that I set the breakpoint in the codeunit code and that this code is not the same as the one getting executed(?). I have a codeunit where I put a MESSAGE('test'); and that triggers, but no debugger appears.
  • kinekine Member Posts: 12,562
    1) The object with the trigger must be closed before the trigger is working
    2) If the CU is singleinstance, try to set the breakpoint before the cu is started.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • garakgarak Member Posts: 3,263
    Sometimes the breakpoints are not executed when the codeline after an "IF" statement is only a single line.
    In other cases, on my plattform, i found out, that whan i empty the table Breakpoints and set the Point new, the debugger stops (before deleting breakpoint he doesn't)

    Regards
    Do you make it right, it works too!
Sign In or Register to comment.