9

I am trying to debug a stored procedure using Oracle SQL Developer. The DB is on another box. I have granted privileges using

GRANT debug any procedure, debug connect session TO <user>;

I have placed the break point inside the procedure on one of the assignment lines. I have tried other places too out of desperation. When I click debug I get the debug dialog and I fill in all the values. When I hit debug the stored procedure runs, the debug controls flash across the screen in a second and then it finishes and exits. It misses all the breakpoints as if it weren't even there. Any ideas?

2 Answers 2

15

For debugging to work you have to compile the Package / Procedure with the Debug-Flag. In SQL-Developer this is done by opening the package and clicking on the little "Gears with a bug"-Button (Compile Package for Debug)

After that all your breakpoints will work.

Sign up to request clarification or add additional context in comments.

1 Comment

Correct cause for my case
2

Okay, found the answer by accident. Turns out after I altered the proc slightly (added debugs) and the saved then it started working.

1 Comment

This answer will probably not help others in your situation much, I think when you changed something and saved -> saving a Stored Procedure in SQL-Developer actually compiles it in the Database -> See my answer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.