Hi,

 

Firstly, I believe the etiquette is to always use “Reply All” so that the rest of the group is aware of the thread progression.

 

  • What if that's not there (as in debugging 3rd party code)?

 

I haven’t used any third party code that isn’t the JVM or could access the source to and so I am not aware of any other method to view all the data within a class as a single valuewithin the debugger as this would depend on how to present the Array elements and each of those could have arrays etc.

 

Having said that, I just remembered that I also publish instances of classes as JSON (via Googles Gson API, although I assume you could use Jackson as well) using the following code

 

  static String toJson (Object object, boolean suppressNulls) {

    GsonBuilder gsonBuilder;

    gsonBuilder = new GsonBuilder();

 

    if (!suppressNulls) {

      gsonBuilder.serializeNulls();

    }

    gsonBuilder.setPrettyPrinting();

 

    return gsonBuilder.create().toJson(object);

  }

 

And so you could use that in your code to publish the nested array to a log or System.out()

 

John

 

From: Admin @ Goodun
Sent: 09 January 2024 15:06
To: John
Subject: Re: Variable display in debugger

 

That's great. but it seems to rely on you coding your classes with a

toString method.

 

What if that's not there (as in debugging 3rd party code)?

 

 

 

--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to