Debugging in STS - a small suggestion

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Debugging in STS - a small suggestion

Roshan Dawrani
Hi,

While debugging in STS inside Groovy closures, the type of referenced variables gets shown as Reference<T>, which is not really so useful, I think.

How about (also) showing the type of the variable the groovy.lang.Reference wraps over - like a) "LinkedHashMap<K, V>" or b) "Reference<LinkedHashMap<K, V>>"?

Cheers.
Reply | Threaded
Open this post in threaded view
|

Re: Debugging in STS - a small suggestion

Andrew Eisenberg
There's not much I can do here since the JDT debug variables view is closed.  I can't change what is shown in the "value" column.  However, if you click on the "Show logical structure" column, then things get better.  The stringified value is shown as the referenced object's toString() and expanding the tree shows the underlying structure of the value (bypassing reference).

Make sure this button is clicked:

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAAyCAIAAAB3dNSiAAAKl2lDQ1BJQ0MgUHJvZmlsZQAASImVlgdQVGkSx7/3JifSwEhmyDmnASTHIUsGURlmhswwDAwgYkIWV2ANqIiAImFRRMFVCbIGBBTTopgw7yCLirIuBkyo3AOO4e7qtq6uq/q9X3V1/V93v++ragDIjSw+Pw2WAiCdly0I8XajR0XH0HGPAA6QAAWQgR2LncV3DQ72B39rH+4CaPZ9y3hW6+/z/qtJc7hZbACgYITjOVnsdIRPIl7G5guyAUC5IHGt3Gz+LHMQlhUgBSKcN8uJ81w2y/HzfGAuJyzEHWFEB09msQSJAJB6kDg9h52I6JBECJvxOMk8AMhI58CJncRCtMmzNRilp2fMcgHCevH/opP4b5rxYk0WK1HM873MGd4jOYufxlr9f47jf1t6mnDhG6qIk7NSQ/1me0ZmlsdmeYYucBKX6b/A/Gy3kAVOzmaGiXOEPuELLEwNd13g1Aw/cT4vPjBIrJ/lHrPA+UlhkQvM4Xp4LrAgI0Scn5UT6rmY7x64wCks3+AFZgnmepljbpp3yGLNweI6eWmB4l4SBF7iHG7WYr/ZSWE+YkYOgDg/2Ysp7lfgs6ifFizWFAhDxHPg8sLFmhyWh3i2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n+6a4peWFjYJB3BILOzsw158JpAb911HfkPH5zvgIcTW2T3TE5ONlpDfTQrHh2aKqMDtSyr0Rrqo6kyOvwHlXNrj2UZNjUAAAAASUVORK5CYII=" alt="">

Go to Preferences -> Java -> Debug -> Logical structure.  You can create your own entries here (but Reference is constributed as an extension point so it is fixed).  Let me know if this works for you.

On Thu, Jul 19, 2012 at 1:52 AM, Roshan Dawrani <[hidden email]> wrote:
> Hi,
>
> While debugging in STS inside Groovy closures, the type of referenced
> variables gets shown as Reference<T>, which is not really so useful, I
> think.
>
> How about (also) showing the type of the variable the groovy.lang.Reference
> wraps over - like a) "LinkedHashMap<K, V>" or b) "Reference<LinkedHashMap<K,
> V>>"?
>
> Cheers.
> --
> Roshan
> http://roshandawrani.wordpress.com/
>

Reply | Threaded
Open this post in threaded view
|

Re: Debugging in STS - a small suggestion

Roshan Dawrani
Thanks for replying, Andrew.

I use "Show logical structure" all the time, just didn't know that "JDT debug variable view" was closed for modifications by a plugin.

Cheers.

On Thu, Jul 19, 2012 at 9:32 PM, Andrew Eisenberg <[hidden email]> wrote:
There's not much I can do here since the JDT debug variables view is closed.  I can't change what is shown in the "value" column.  However, if you click on the "Show logical structure" column, then things get better.  The stringified value is shown as the referenced object's toString() and expanding the tree shows the underlying structure of the value (bypassing reference).

Make sure this button is clicked:



Go to Preferences -> Java -> Debug -> Logical structure.  You can create your own entries here (but Reference is constributed as an extension point so it is fixed).  Let me know if this works for you.


On Thu, Jul 19, 2012 at 1:52 AM, Roshan Dawrani <[hidden email]> wrote:
> Hi,
>
> While debugging in STS inside Groovy closures, the type of referenced
> variables gets shown as Reference<T>, which is not really so useful, I
> think.
>
> How about (also) showing the type of the variable the groovy.lang.Reference
> wraps over - like a) "LinkedHashMap<K, V>" or b) "Reference<LinkedHashMap<K,
> V>>"?
>
> Cheers.
> --
> Roshan
> http://roshandawrani.wordpress.com/
>




--
Roshan