SQL Developer Debugging, Watches, Smart Data, & Data

thatjeffsmith SQL Developer 9 Comments

Tell Others About This Story:

After presenting the SQL Developer PL/SQL debugger for about an hour yesterday at KScope12 in San Antonio, my boss came up and asked, “Now, would you really want to know what the Smart Data panel does?”

Apparently I had ‘made up’ my own story about what that panel’s intent is based on my experience with it. Not good Jeff, not good. It was a very small point of my presentation, but I probably should have read the docs.

The Smart Data tab displays information about variables, using your Debugger: Smart Data preferences. You can also specify these preferences by right-clicking in the Smart Data window and selecting Preferences.

Debugger Smart Data Preferences, control number of variables to display

The Smart Data panel auto-inspects the last X accessed variables. So if you have a program with 26 variables, instead of showing you all 26, it will just show you the last two variables that were referenced in your program.

If you were to click on the ‘Data’ debug panel, you’ll see EVERYTHING. And if you only want to see a very specific set of values, then you should use Watches.

The Smart Data Panel

As I step through the code, the variables being tracked change as they are referenced. Only the most recent ones display. This is controlled by the ‘Maximum Locations to Remember’ preference.

Step through the code, see the latest variables accessed

The Data Panel

All variables are displayed. Might be information overload on large PL/SQL programs where you have many dozens or even hundreds of variables to track.

Shows everything all the time

Watches

Watches are added manually and only show what you ask for.

Data on Demand – add a watch to track a specific variable

Remember, you can interact with your data

If you want to do more than just watch, you can mouse-right on a data element, and change the value of the variable as the program is running. This is one of the primary benefits to debugging over using DBMS_OUTPUT to track what’s happening in your program.

Change the values while the program is running to test your ‘What if?’ scenarios

Related Posts Plugin for WordPress, Blogger...
Tell Others About This Story:

Comments 9

  1. Hi guys, coul you tell me, How can I enable/show the smart data monitor??
    I´m working in a oaf project.
    Thanks so much!

    1. thatjeffsmith Post
      Author
  2. I have a sql Type object that is fetching correct data. During debug when i try to see the data it is holding, there is no data displayed at the Data window for that object. Value is shown with space and datatype is shown as opaque. Can u help me resolving the same.

    I am using Oracle 12c,
    Sql developer Version : 4.1.3.20

    thanks
    Mohammed Ismail

    1. thatjeffsmith Post
      Author
  3. thatjeffsmith Post
    Author

    Eva, can you execute the stored procedure?

    Is the ‘Debug’ button in the procedure editor toolbar also upgraded? Can you send me a screenshot of what you’re seeing? Or upload one to a free image service and send me a link?

  4. Hi, Jeff! I have a big problem: dedug actions are allways disabled. Don’t know why and cannot cope with it. The sql developer version is 3.0.04. Really hope you will help me. Thank you

    1. thatjeffsmith Post
      Author

      2 things:

      1. Can you upgrade? Versions 3.1, 3.2, and now 3.2.1 have been released since your version
      2. Have you the proper privs to debug? DEBUG CONNECT SESSION is a show-stopper if you don’t have it in 10g and higher

Leave a Reply

Your email address will not be published. Required fields are marked *