6 Replies Latest reply: Sep 19, 2013 2:25 PM by Vadim Tropashko-Oracle RSS

    4.0 EA1 - Ctrl-S always compiles with debug

    Maxo

      If a code object (package, procedure, function) is compiled within the code editor via Ctrl-S then it gets compiled for debug. If the code object is compiled by right-clicking the object in the tree, or right-clicking within the code edit and choosing "Compile" then it compiles without debug.

        • 1. Re: 4.0 EA1 - Ctrl-S always compiles with debug
          Vadim Tropashko-Oracle

          Saving file (Ctrl-S) is a wrong way to look at it. There are two other accelerators -- Ctrl-F8 and Ctrl-Shift-F8 -- check out Preferences->Shortcut Keys.

          • 2. Re: 4.0 EA1 - Ctrl-S always compiles with debug
            Maxo

            I'm not sure what you mean by it being the wrong way to look at it. I understand that there are many ways to compile a code object in SQL Developer. Ctrl-S is one of them. Ctrl-S is a shortcut to File->Save, which is the changed behavior I am reporting. In SQL Developer 3.x and before Ctrl-S, while editing a code object, would perform a compile respecting the behavior in Preferences->Database->PL/SQL Compiler->Optimization Level. Now File->Save seems to behave like Compile for Debug. I personally find this new behavior annoying. If this is an intentional change in 4.0 I understand you can't make everyone happy, but if changing the behavior of File->Save is unintended then a fix would be welcome.

            • 3. Re: 4.0 EA1 - Ctrl-S always compiles with debug
              Vadim Tropashko-Oracle

              This is different from my experience. Ctrl-S doesn't affect any optimization level, nor [deprecated] plsql_debug. Setting Optimization Level to either 0,1,2, or 3 followed by Ctrl-S would compile it with exactly that PLSQL_OPTIMIZE_LEVEL. The legacy PLSQL_DEBUG would be set to FALSE for PLSQL_OPTIMIZE_LEVEL=2 and TRUE otherwise. I admit that setting it TRUE for newly added PLSQL_OPTIMIZE_LEVEL=3 is a bug; it is fixed for EA2.

              • 4. Re: 4.0 EA1 - Ctrl-S always compiles with debug
                Maxo

                I admit that setting it TRUE for newly added PLSQL_OPTIMIZE_LEVEL=3 is a bug; it is fixed for EA2.

                My optimization level is set to 3 so that would explain it. I'm glad to know that this will be resolved in EA3. Thanks for looking in to it.

                • 5. Re: 4.0 EA1 - Ctrl-S always compiles with debug
                  Maxo

                  I would like to note that this bug persists in EA2.

                   

                  For example, on a fresh connection.

                  select

                    plsql_optimize_level,

                    plsql_debug

                  from

                    user_plsql_object_settings

                  where

                    name = 'WORK_ORDER_PKG'

                    and

                    type = 'PACKAGE BODY';

                   

                  alter package work_order_pkg compile body;

                   

                  select

                    plsql_debug,

                    plsql_optimize_level

                  from

                    user_plsql_object_settings

                  where

                    name = 'WORK_ORDER_PKG'

                    and

                    type = 'PACKAGE BODY';

                   

                  Gives me the following output.

                  PLSQL_OPTIMIZE_LEVEL PLSQL_DEBUG

                  -------------------- -----------

                                     2 FALSE

                  package WORK_ORDER_PKG altered.

                  PLSQL_OPTIMIZE_LEVEL PLSQL_DEBUG

                  -------------------- -----------

                                     3 TRUE

                  • 6. Re: 4.0 EA1 - Ctrl-S always compiles with debug
                    Vadim Tropashko-Oracle

                    You are correct. After setting plsql_optimize_level=3 in preferences -> compiler settings I noticed

                     

                    alter session set plsql_debug=true;

                    at the start of new connection in the log. This is why


                    alter package


                    in your script behaved this way. Bugged for EA3 fix; hopefully it won't escape QA.