Pause debug only on un-handled exception?

Hi all,

Is there a way to make debug mode only pause the run when it hits an unhandled error? For example if I have a try-catch or a throw activity I don’t want it to pause, I want to it to behave as it would in live where it automatically runs through the try-catch exception activity, or simply goes to the next transaction when it hits a throw activity. I only want it to pause if it can’t find a UI element because the selector needs tweaking, or a file path is incorrect etc.

I know that you can enable “Continue on Exception” in the debug ribbon but that means it continues on all errors which I don’t want. It’s not a major problem, just annoying having to click “Play” a bunch of times to restart the debugging when it hits an error that I’ve already handled.

Have a look at Conditional Brekapoints

For the condition we would recommend to react on the specific Exception type

2 Likes

Hey @ChBain
You can use few options. First way is “Continue on Exception” option which allows execution to continue despite errors, but unfortunately, it applies to all exceptions, including those you might want to stop at.
You can also refine exception handling to ensure that “Try-Catch” blocks only capture expected errors while letting unexpected ones remain unhandled so that the debugger stops on them.
It’s also useful to place breakpoints strategically where you actually need control over execution rather than letting the debugger stop at every exception.

1 Like

The problem is the websites we automate are enterprise websites/applications so often they’re not built very well and definitely not for automation, things like selectors changing for a text box that has text in it vs an empty one.

It’s very rare we have actual business exceptions, they’re almost always system exceptions due to UI selector issues so I need the bot to pause on those so I can fix it there and then (my favourite new feature in Studio!) and continue the debug

Hi @ChBain, To break UiPath Debug Mode only on unhandled exceptions like UI selector failures, or missing files, but not on managed exceptions in Try-Catch blocks, you can go to Debug Settings in UiPath Studio, enable Break on Unhandled Exceptions, and disable Break on Handled Exceptions (Try-Catch). Debugging will stop only for severe system issues, not managed exceptions. For greater control, apply Conditional Breakpoints to break on specific errors like SelectorNotFoundException. This approach minimizes interruptions and allows for efficient debugging

1 Like

Where are those settings? In the main UiPath settings this is the only settings I could find relating to debugging.

I had a look in project settings but there was nothing obvious that jumped out at me

I wish I knew where to find this setting in Studio

Cheers

1 Like

Hi @ChBain @J0ska, you should enable the break on exception settings on the debug tab beside the slow step button… I hope this would help you solve the problem…

1 Like

It looks like this feature came in Studio 2024.10 so if you’re on an earlier version (like me) you won’t have it.

This looks like a screenshot from version 2018.x?
Additionally it has nothing to do with Handled/Unhandled exception.
So unfortunately not helpful at all.

Cheers

Nothing like this in 24.10.

Cheers

I’m talking about this, where you have conditional breakpoints. If you use the “release” pulldown this topic only loads for 24.10, the topic does not exist for earlier versions.