I am trying to get familiar with the QtCreator IDE. However, I've come to notice that while debugging, I can't take a closer look at the standard components. Looking at the included picture, I can't go deeper into, say the QString name property of temp in the locals and watches view on the right side of the screen. Let's say I want to know it's length while debugging. I can't see that now, as I don't get more information about the name property.
My question is rather simple. How can I inspect these standard components (as the name property is a QString) deeper, showing me detailed info about the QString itself and not only it's contents.
Apparently, this is solved by de-selecting the Debug Helper from the Debug options menu (Tools -> Options -> Debug -> Debug helper tab).
Related
New to Xcode, but I want to check the value of variables in Xcode's inspector, like following, buttonFrame has origin and size property, but they are not displayed in the inspector, is there a way to show that?
The real solution here is using debug mode instead of release mode to build the app to the device, to change the mode:
project -> scheme -> check the target -> edit scheme -> run -> select the debug mode in the drop-down selector
You can use the po command as described in apple's documentation:
According to apple:
Print Description of “{variable}”. An equivalent to using po in the
console or using the Print Description button in a tool tip.
XCode Debugging Tools
But keep in mind, that if you don't see values for the button's frame and size, it could be that they haven't been set yet. Make sure that the break point you are using to inspect these variables is being set at a point in your code in which you are certain the view has been laid out viewDidAppear for example.
Please do you know about any tool which would allow me to debug Android UI in the way web debug tools work? I mean view which style is applied to each particular View, or also I would like to be able to see some inheritance tree etc..Do you guys know about something like that?
The only way I know of to look which style is applied is to look in xml. Simply search for Style and you'll be able to go through them one at a time, but something like web debug doesn't exist as far as I know.
Inheritance trees for styles are also not present and you'll have to go through them the hard way (writting on paper or something). In general android styles is a pain to learn but when you've learned to navigate it you'll be able to live with it :)
I haven't found a method to do so other than Warpzit's method. In Eclipse, there is a helpful tool to see your UI hierarchy though. When in debug mode, open the "Devices" window (if you can't find it: Alt+Shift+Q, Q). Then click the "Dump View Hierarchy for UI Automator".
You can see some view attributes there as well as the way it's build up.
There's also a hierarchy viewer in the SDK tools/ directory, but I haven't used it yet.
I know this is not the answer you're looking for, but this is what I do because I don't know of a better way.
On Eclipse, I start with the xml layout in question and I drill down by pressing the Ctrl key (or the Command key on a Mac) and clicking on the style in question (the style name becomes an hyperlink when that key is pressed down and I hover the mouse over it). Then, I use the yellow arrow keys on the Eclipse toolbar to come back through each pane of code once I need to go back to the root of where I started from.
On Android Studio Preview, which unfortunately I can't use at work because everyone uses Eclipse, the same shortcuts work as well, but unlike Eclipse, the navigation support and the refactoring support work much better, I'd recommend that you look at Android Studio if you're not satisfied with Eclipse's support (my only warning is that once you have a version of Android Studio that works for you, that you do not update it, because updates of Android Studio tend to break it frequently).
To find it, please go to Layout Inspector,
Tools --> Android --> Layout Inspector
My BizTalk (2006) orchestrations open by default in design view. I need to see the file behind (which appears like XML). I don't know how to switch.
With winforms and the like, F7 is the 'go to code' shortcut but I can't find any equivalent for this.
The only thing which sometimes work is to search for a string which appears in the orchestration and within the code of BizTalk. I have done a search for my string within Search Files (under find) and the Find Results box shows me the string lives in MyFile.odx (and it displays the ). However, I can't get the actual code on screen as it only shows the design view.
So, just to make sure this is really clear, I want to switch between the 2 screen shots:
From the Design View:
to the 'code behind' view:
Right click -> Open with.. -> XML Editor
As a work around, I can open it from Windows Explorer in notepad. Not ideal, but at least I'm not stuck any more.
I need to know how to open the form of a program I am debugging.
I loaded an existing solution into VS2010, I can see the code, but I want to see the GUI part of the project, click on buttons and see what part of the code they take me to, set breakpoints where I feel like.
I don't know how to see the GUI in VS2010, where can I do that?
Also, where would be a good resource to learn the ins and outs of VS2010?
Depending on how the UI was created, there may or may not be a way to see the UI at design time. Particularly if this is an older Windows UI application, it's likely that the windows are created entirely in code, and there is no design-time UI for you to see.
There is a dialog editor, for dialog windows that are defined in resource (*.rc) files. CTRL-SHIFT-E brings up the Resource Viewer and you can look for things under the Dialog node. It is possible that your main window is a dialog-style window, as that's one of the options you get when you create a new MFC-based application.
Otherwise, your only option to see what your UI looks like is to run the program and see. Tracking down which UI elements do which actions in your program will require finding the appropriate event handlers or message handler methods (again, depending on what UI framework, if any, is in use) and setting breakpoints.
The generic answer is:
Hit F5 to starting Debugging mode. (Or under the Debug menu choose Start Debugging)
But it depends on how your project is setup and what type of project it is if F5 will work that easily for you.
What kind of program/language are you using?
With a form, I believe you have to File-->Open-->Project/Solution
Now if its a website, you would open Website. If you tried to open a windows form under a website then you wont see the design.
Typically you would just double click your form name (form1.cs) because then your design view will pop up or hit Shift+F7 or rightclick --> view designer. Then just double click whatever tools you have on your form (like a button) and it will automatically go to the button code.
If its a website, then it would be under website1.aspx while the code sits in website1.aspx.cs
But if none of that helps, here is a good place to learn this stuff
VisualStudioWalkthroughs
If I'm looking at a method definition in Visual Studio (with Resharper) is there an easy way to find out what class it belongs to? (As of now, I've resorted to a text search in the "up" direction for the string "class".)
The Resharper command Go to containing declaration (ctrl + [) should do the trick
Edit:
Or if you have the navigation bar at the top of the code window enabled, that should display the type name. But I have that turned off, since I use keyboard navigation and the bar itself slows down Visual Studio.
You have files with more than one class in? That makes ponies sad...
Anyway, to actually answer, can't you just look at the navigation bar?
The best (direct) way specific to your question is PHeiberg's answer.
But if you ask this question I guess you don't know the File Structure window that can be enabled by ReSharper->Windows->File Structure or by shortcut Ctrl+Alt+F.
With that window you see always where you are in your file.
Aside from using ReSharper's File Structure and/or Go to Containing Declaration - options mentioned previously - there's also a tiny feature in ReSharper called Quick Documentation that in my view is better suited for this kind of task since it shows you method info in-place, without forcing you to navigate anywhere from the method you're on. Ctrl+Q, Esc, and you're done. It works on all kinds of symbols (not limited to methods), both on declarations and on usages.
For VS, right click on the function and select 'Go To Declaration'. (Ctrl + F12)