x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

TSubobjectPtr won't visualize properties properly in Visual Studio debugger Watch?

Hi all,

So pointers that are declared as TSubobjectPtr<> are not visualizing properly for me within Visual Studio 2013 debugger 'Watch' variables. They appear as fully expandable objects, where I can expand them all through their class hierarchy and see the properties at each class level. But I can't directly retrieve any properties on demand using "Pointer->Property" syntax -- if I try that, the Watch expression evaluator simply says "expression must have pointer type" (and manually casting the type doesn't help). (nor does it work to hover tool watch values on properties of TSubobjectPtr's in the code)

I've installed the UE4 VS 2013 debugger visualizers, and I see FNames just fine so I know that's working. I even see a section in the visualizer file about these kinds of pointers:

 <DisplayString>{Object}</DisplayString>
  

But it just doesn't seem to work for me, or other people whom I'm developing with :(

Has anyone had this work for them, or have any ideas how to fix it?

Thanks for your help!

Product Version: Not Selected
Tags:
more ▼

asked Nov 04 '14 at 04:25 AM in C++ Programming

avatar image

JKMan
36 3 7 6

avatar image JKMan Nov 04 '14 at 04:25 AM

Blech, it ate my code snippet, here we are:

 <!-- FSubobjectPtr|TSubobjectPtr visualizer -->
   <Type Name="FSubobjectPtr|TSubobjectPtr&lt;*&gt;">
     <DisplayString>{Object}</DisplayString>
   </Type>
 
avatar image Steve Robb STAFF Nov 04 '14 at 05:35 PM

Hi,

Your visualiser should work, but only let you view the TSubobjectPtr instance as if it was a pointer. It doesn't enable the debugger to allow support Pointer->Property syntax; for that you'll still have to do Pointer.Object->Property.

TSubobjectPtr will soon be deprecated in favour of raw pointers anyway, so I wouldn't worry too much about it.

Steve

avatar image JKMan Nov 05 '14 at 01:29 AM

Aha yes indeed, using this expression syntax I can properly "watch" any variable of the pointer in the debugger window:

((USkeletalMeshComponent*)Mesh1P.Object)->bReceivesDecals

But yeah, it prevents watch tooltips from working because it doesn't inherently know how to evaluate that type. So will look forward to TSubobjectPtr's becoming extinct :)

Thank you!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question