VSCode PHP Debug hovering over properties - visual-studio-code

Using PHP Debug (Xdebug) I can hover over objects and arrays just fine to see values but this only seems to work on the 'parent' object, I was wondering if there is a way to hover over array elements or object properties to quickly see their individual values?
E.g. instead of hovering over $MyObject, I want to hover over SomeValue to see the individual value. I could do this in another IDE, it's much quicker when working with large objects/arrays.
$MyObject->SomeValue
$MyObject['SomeValue']

Related

Show the value of the property and not just the type

In our dear VS Code when we hover in any variable the vscode by default shows the type of this variable, when it is an object, it shows the structure of the object.
e.g:
I would like to know if in addition to showing the type or structure it is possible to show the value of the properties.
If this is not possible in the vscode itself, is there any extension that does something like this?
The closest you can get to what you want (show variables value), is to add the variable in the debug window to the watch list. In debug mode, when you hit a breakpoint, your watch will evaluate the value at the current time (whether its been set, or not etc.) and will output what it is in that window for you.
See below:

Sorting object's run states

On object's diagram, I have two different objects inherited from the same class. Unfortunately displayed run states are sorted in a different way. I am trying to sort it but the order of displayed values doesn't change.
Is there any way to sort it? I've tried to set 'Sort Features Alphabetically' but nothing happened.
You need to sort that "manually". t_object.runstate holds
#VAR;Variable=<name>;Value=<val>;Note=<note>;Op=<op>;#ENDVAR
and it will appear in the order right there. So just disassemble the string, re-order as needed and replace it.
EAUI: The sort triangle in the Run State editor has only effect in the editor itself. It does not re-sort the real list. Report a bug (also about a missing "green arrow" which IIRC can be emulated by a strange key shortcut).

MATLAB member function suggestion

If for example you have acquired a object of type handleplot with expression like below:
handle = plot(t,functoin1 , t , function2 ) ;
Now handle will be an array that contains two elements, handle(1) and handle(2). Now suppose you want to change some properties of one of these objects, like set a LineWidth, change the Color, or the like.
Is there any way in which you can activate auto-completion or suggestions when you type handle(1). (note the memebership operator .)? I am looking for the automatic suggestions that MATLAB provides for member functions in a combobox near the blinking cursor, similar to the way other IDEs provide this feature:
MATLAB's objects support tab completion. After typing handle(1). simply hit tab and you will receive a list of available methods and properties of the graphics object.
If you want more help on a method, you will also get a popup dialog of the method and the accepted input arguments.
If you want to programmatically get a list of properties of an object, you can use properties
properties(t)
If you want a listing of all properties and their values, just use get
get(t)
i use this method ...
for example i'm writing a program in matlab editor and when im want to know the properties of an object just stop coding and run the program , know it's have my object (for example handle) and know i can write the properties(handle) in command window to know the exact properties of handle . as Suever says .

Eclipse plugin that allows customized view of variables/objects while debugging

While using C++ I have to deal with programs that have objects like matrices, linked lists etc
The default view of eclipse for variables while debugging is not very useful. It normally shows pointer values with value of only the first element in the array.
Below is how it is in eclipse:
As we can see the matrix object has rows and columns integers and a double 2D array. I cannot see the values of the array in user friendly manner.
My question is that, is there anyway in eclipse (using plugin etc) through which I can define custom user interfaces (popups) for each object/class of my interest.
For example I would like to have the following (Matlab's view) kind of popup when I hover over an initialized matrix object:
The JDT has a feature called detail formatters to make that possible. The corresponding implementation for the CDT seems to have stalled after a first prototype however, and did not make it into Eclipse.

Show Diff of two trees in Eclipse

In Eclipse, I am using a TreeViewer to show a custom tree, whose contents are drawn from an ITreeContentProvider. Now I am trying to create a second view that allows me to automatically show a two-way comparisons of two such trees. I found various views for textual comparison within Eclipse, but I could not find an easy way to show the structural differences between two arbitrary trees. Any thoughts?
When the Data Model the ContentProvider is creating and the labelProvider is diplaying is the Same, you could use the same viewer in the right and the left of a view.
You could than compare the TreeItem Elements of both TreeViewer and mark the ones, which has changed.
The other solution is to compare the DataModels and add a special flag to the changed elements. The LabelProvider can check this flag and draw a special color to indicate, that this element is different.
I do not know an Editor inside Eclipse, providing this functionality.