When you have started your application in debug mode. You can see the threads in the Debug view which is in the Debug perspective by default. For detailed information you have to use VisualVM.
Variables/Expression view – Shows the declared variables and their values. Press Ctrl+Shift+d or Ctrl+Shift+i on a selected variable or expression to show its value. You can also add a permanent watch on an expression/variable that will then be shown in the Expressions view when debugging is on.
In your Eclipse development interface, select Window > Preferences. This mode displays verbose debug logs so you can view them in the Eclipse console window while you are previewing the app.
In the Variables view you can right click on Details pane (the section where the string content is displayed) and select "Max Length..." popup menu. The same length applies to expression inspector popup and few other places.
In the Variables view you right-click on the variable and select Change value. If your variable is huge you have to wait a few minutes (in this case Eclipse doesn't respond to commands) but in the end Eclipse will show your variable entirely.
If you have a really long string, I use a different strategy: dump it to a file. I have a snippet of code I use in the Display view, which is evaluated to dump the data to a file. I use Commons IO, but you can do it with JDK only methods.
org.apache.commons.io.FileUtils.writeStringToFile(new java.io.File("<filename>"), <expression to evaluate>);
Naturally, you will need the Commons IO JAR in your classpath for that to work. If you don't, resort to JDK work.
The best way to view a String value from eclipse debug view is as below.
1) Switch to debug view in Eclipse
2) Select the desired variable in variable pane.
3) Right click on display area of variable pane where value is shown and click on Max Length. Enter the maximum char value in Configure Details Pane .
4) Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With