vs code debugger not showing the contents of unordered_map variables - c++

Does anyone know how can i watch the map variable in the watch window?
I tried to search on google how to watch the contents of map variables, But did not find any.

Related

netbeans debugging pretty display string/vector

is there any way, that the debugger in netbeans directly shows me the content of string variables?
Currently, If I press on the small "+" left of the variable name it shows me things like "npos, _M_dataplus, _M_string_length ...". It would help a lot to simply show me the content of the sting instead.
Same happens if I have a vector. In this case it is really a pain to debug variables becaus I always have to search for the content...
(I use NetBeans IDE 8.2)
Thanks
image

Is it possible to type in variables in the Xcode debugger to check what they are?

I've done my fair share of searching, but the problem lies in the fact that I don't know all the nomenclature surrounding the debugger, so I'm unsure of what this function is called.
In my programming class, we use Visual Studio. In it's debugger, you can type in a variable name at any point and see what it's value is.
Is there a parallel version of this in Xcode? I can't seem to find it.
Option 1:
Add a breakpoint to the point where you would like to check the value. When it stops there, click on console screen. Type the following:
po yourVariableName
Option 2:
Click on "Show debug Area". Now tap on "Show Variable Area". You can see values on run time for each variable in action.
For more detailed reading, read this question.

Visual Studio debugging - Order of local variables?

I am wondering on what concept/logic the ordering of the variables is based on in the 'Locals' tab when debugging an application with MS Visual Studio.
For me it seems to be somewhat randomly ordered? Or is there any concept behind the ordering of these variables?
Is there an option to sort these variables alphabetically? This would be very handy.
I don't know a way to sort the items in the locals tab directly. But here is a workaround:
Select all locals (Ctrl-A, Ctrl-C) and paste them to a watch list (Ctrl-V).
Sort the watch list by (workaround again) cut and pasting them.
Note that there is an "Autos" watch window. Maybe it's better suited for your needs, although you neither can sort entries there.
Finally you may have more than one (custom) watch window, see Menu / Debug / Window / Watch / Watch 1 .. 4. This may also be helpful organizing variables to watch.
In my Visual Studio 2008, the sort order of Locals window is as follows: the current class-level Me object is first, with any module-level variables being sub-nodes of that. Then listed below Me are the procedure-level variables in Alphabetical order. After years of searching, I haven't found any way to change the sort order. The only thing left I can think of is a Visual Studio Extensibility Add-In, but I haven't explored that.
I have a strong background in VBA, and I can tell you over there, if there's a Me object in the current context, that comes first just like Visual Studio. But...and here's the difference...the module-level variables are listed in Declaration Order, meaning they're listed in the same order as their Dim statements. And just like Visual Studio, the order can't be changed.
The VBA way of doing it is much more useful, because you can control the order of the Locals window by re-ordering the Dim statements in the code.

Eclipse Debugger doesn't show the value of a long string in whole

I'm using Eclipse Juno to debug a Django app. However, a long string gets cropped when inspecting the variables in PyDev's debugger:
The content area of the variable is scrollable, but the value suddenly stops there with the dots (see picture). Clicking the variable or watching it doesn't help. This is not a huge problem, but is there an easy fix for this?
See discussion and answer here. Essentially, work around the limitation by typing the variable name into the debug console and it will print out in full.
You can change maxlength. It is a Integer.

Finding location of crash using Map file

I am investigating a faulty code. Application verifier shows heap is corrupted after below call:
AA!Class::Function+dbaf
I have map file with me.Please help me how to reach on line number using above information and information present into Map file.
Preferred load address is 00400000
0002:00000dc4 __imp_?Class#Function##QAEXV?$vector#Uty_point##V?$allocator#Uty_point###std###std##0PAV23##Z 0049bdc4
Note : I have anonymized class and function name.
Do you only have a map file? No PDB? If you have full symbols then use the map and .pdbs (and .exe) with WinDBG (are you on windows?).
I would imagine that you do seeing as how you have been given the name of the function.
IF not... dbaf is your answer. What does that equate to? The offset should be the location of faulty instructions.
Of course you would need to figure out the number of instructions (assembly instructions) that each has.
I remember being able to jump to the faulty code by having only the map file and the value of EIP (the instruction pointer, the address where the code crashed), a quick google search pointed me to this webpage: Map Files And DLL Rebasing. From what I remember in an ideal situation you can change the value of EIP directly in the Visual C++ debugger and it will jump to the corresponding code line.
Now, this was really a long time ago in the Visual C++ 6 era, I don't even know if it's still applicable today. As already pointed out you should really look into symbols and the program database options in Visual C++, there is tons of information about how to setup and use them.
MAP File Browser provides functions to allow you to turn crash addresses, or DLL offsets, or symbol offsets, or event log XML crash data into the corresponding symbol location.
Load the map file into MAP File Browser then go to the Query Menu.
Full disclosure: I wrote MAP File Browser.