Hi,
When debugging methods that contain try/catch statements, by stepping through each line of code, the try/catch statements have tehe following behavior:
- When an error occurs in the TRY part, Servoy displays an error popup, which you have to clikc away before being able to continue stepping through the code.
- After clicking away the error popup and doing one step, the ‘cursor’ goes to the end of the catch statement
- The next step makes the cursor go to the beginning of the catch code.
This behavior is annoying when you’re debugging another part of the code, but the executing of the piece of code you’re debugging also fires a method with the try/catch part. This especially becomes anoyying when the try/catch part is in a loop, so called multiple times.
how I would like the debugger to behave with try/catch statements:
- When steppign through and an error occurs, jump straight to the beginning of the catch part, without giving an error popup.
Hope this, or something like it is possible, because the current behavior makes debugging a pain in the …
Paul
No one else having this problem?
I’m now debugging a method. Put a breakpoint somewhere at the end of the method to debug, but to get to that point, offcourse the part of the method above needs to be executed. So I press Run, to get to my breakpoint quickly.
In the code to get to the breakpoint, there is a loop with a try and catch statement. Since the loop is run about 150 times and about half of the time the TRY part causes an error, I find myself having click away 75 error popups and clicking the run button again (also 75 times for the people who are counting
).
As you hopefully understand, this is not really workable… Could this behavior change (at least not show the popup and just continue the method as if it would run without the debugger on when you pressed Run)?
Paul
I guess nobody uses Try/Catch often???
The try catch is of no use if the Servoy function called traps for errors and shows a dialog (that before getting to your JS catch)
Im my case, the Try/Catch works fine
When I run my method with Debugger off, the method just goes through the Try/Catch without showing any error popup
When I run the method with debugger on, the error (popup) that should be catched by the Try/Catch clause is not catched, but shown and you need to click it away manually.
Now, when stepping though a method, this is not really a problem for me, but when I run the method (so not stepping through it) with debugger on, because I expect a problem somehwere else in my method, not I have to click away many unrelevant errors popups that are normally catched with the Try/Catch.
this makes debugging a pain in the …
Paul
I can confirm this behaviour. If you debug, all errors caught are shown in a dialog. It is annoying when you are trying to verify something else.