How should I cleanly abort/cancel a logic block debugging session?

Sometimes I realize while debugging a logic block that it isn’t worth continuing to debug and the debugging session should just end now.

If I close the browser window/tab directly, the associated Job seems to continue to run until I guess it times out. This seems a bit wasteful?

Is there a better way to do this?

This is intended behavior to allow debug jobs to be resumed if they’re accidentally closed or there’s some browser-side issue. If a debug window is closed or lost, you can still use the link from the notification to pick up where you left off. Current behavior is the job will terminate automatically after 10 minutes of inactivity or 60 minutes total, whichever comes first. To terminate the job manually, the only options you have today is to click run in debugger or go into the jobs table and terminate the job itself. We could definitely explore adding a terminate button in the debugger window if that would add value. Feel free to enter an idea if so.

1 Like

Adding to Joe’s answer - after a timeout is reached the job releases to run. It does not end in error. If you want to force the LB being debugged to end in failure then his instruction w/ the Job is the right way. If you just want to turn it loose to run to completion then press run for any debug sessions. Either of those is better than abandoning the debug job by just closing the debug window. When you abandon it you are still consuming (a little) capacity in the batch server and if you abandon it within a fetch loop you are holding a cursor open on the DB as well.

1 Like

There is an ability to cancel the debug session from the UI. When selecting an action to debug in an app and then performing that action, the associated debug session will open in a new window or tab and the existing tab will become disabled with a loading circle and a ‘Cancel Debugging’ button.
Does this not actually terminate the job? As far as I know, this is the right way to close the debug session without running it to completion.

This action obviously does not apply when taking the link to an active debug session for debugging of a background task or test harness; those will continue to run in the background unless run to completion.

@ross good call out about canceling from the originating app when initiated that way. My current situation which led to the ask involves debugging of a background task LB where, as you mentioned, that option isn’t available.

1 Like