Positioning of cursor in script after error during execution


Our sources for PL/SQL objects are ‘enhanced’ with some additional stuff, like logging the compile and registering the object for purposes of environment management.

So, I usually compile by runnig the entire script, using F5.

Now when the compile succeeds, the cursor will remain in place.
When an error is detected, the cursor will move to the beginning of the block containing the error.

Not too practical when that block is a hefty package body…

Is it possible to position the cursor either at the first detected error or at the original location (assuming that the last edit is likely to be close to the error)

Kind regards,
Abe Kornelis


I just noticed: after a successful compile the cursor does reposition at the cursor location only when the cursor is in the middle of block.

When the cursor is at the top of the file, it will repostition after F5 to the begin statement of the last block executed.

Is there a reason for this difference in behaviour or is it by accident?

Personally, I’d like my cursor to be repositioned to the location where I it was before I hit F5.

Kind regards,