any idea where can I find these great debugging features? I settle with bookmarks, but what about the others?
Set Next Statement
QuickWatch
ImmediateWindow
CallersGraph
Sry, i'm pretty new in xcode and mac dev.
Thnx
Set Next Statement - just drag the instruction pointer (from this post).
Have you found the "Debug Area" (View -> Debug Area)? There you can interact with the command-line debugger (e.g. gbd) via the Output pane, which is somewhat like the Immediate pane in MSVS if I remember correctly. There's also the variables pane.
I'm not sure what you call the CallersGraph, you should be more specific (at least link to the appropriate MSVS help pages).
Related
When I'm in peek preview, I sometimes wish to promote it to document. It's done by mousing on the icon as shown below.
On occasion (most of the occasion, in fact), my mouse is tired and wants me to use my keyboard for such promotion to document. According to the wisdom on the net, it's achieved by CtrlAltHome.
In my VS, there's nothing assigned to the key combination, so I'm guessing someone snack in and changed that without my permission. However, to restore it, I need to know what the command in Tools | Options | Environment |Keyboard is called.
I can't find anything appropriate there (I've tried different variations of the MS's description of the command: "Promote the Peek Definition window to a regular document tab").
So, what is it called? If it differs between versions, I'd like to know the name for each, where the peeking is avaialble (started in VS13, if I'm not mistaken).
Given the meaningful effort I've put into composing the image, every and each can clearly see that it's a crucial and important matter, given the circumstances.
In Visual Studio 2013 the command name is Window.KeepTabOpen.
I had the same issue but on reverse. I hate the Peek Definition and didn't know how to get rid of it. Well, I found it. In Visual Studio 2017 you need to go to Tools -> Options -> Productivity Power Tools -> General -> Control click options. There you need to check/uncheck the Control click shows definitions in Peek
Hope it helps!
PS. In order to see Productivity Power Tools you need to get it first using NuGet
A workaround for this (for Visual Studio 2015) is the following:
With focus on the peek window to open/dock:
Close peek window
Esc
Go to definition
F12
Pin tab
Alt+-, P
If there are multiple/nested peeks, then replace step 1 with:
Previous peek window
Ctrl+Alt+-
I have been assigned to a project at work and I need to do some old-style debug because the Debug itself doesn't work with the libraries which are being used.
So, since it's a C++ with Qt application, I first tried with qDebug(). Then with cout, and finally with printf (which I hate in comparision to the former ones). NOTHING.
Nothing is written into the output window of Visual Studio 2008, and I'm quite sure it is executing these lines of code (I even tried to put a qDebug at the very beginning of the main.cpp). It is a GUI app by the way, and I've tried Debug output as well as Build output, but nothing is displayed.
I have looked for similar questions, but none of them provided a solution yet. Any help?
Chances are, your Visual Studio environment has been configured to redirect all output from the Output Window to the Immediate Window. I've been bitten by this a couple of times, as this is inexplicably a default setting for certain environment configurations.
To reset the setting, follow these steps:
From the "Tools" menu, select "Options".
Expand the "Debugging" item in the tree to the left, and select "General".
In the list to the right, scroll down to "Redirect all Output Window text to the Immediate Window", and ensure that it is unchecked.
Click OK to return sanity to the world.
It looks like you can't use qDebug directly if it is not a console based application. Sounds weird to me, but sadly it is like that.
I've worked on a few projects now, and I've had to change the framework search paths, set the bundle loader, etc.
But I've never felt totally comfortable with that Project (or Target) "Get Info" window. I still don't know what half the stuff in there is, and whenever I change anything, there's always a bit of finger-crossing when I click Build. Building and linking all feels a little "magical" to me right now.
I assume this feeling isn't normal. Does anyone know of any good tutorials for these non-code-related parts of building an app?
When you select a build setting, Xcode 4 will show a short description in its Quick Help, which is in one of the Inspectors you can show on the right side of the window.
In Xcode 3, the description will appear at the bottom of the Info window that tells you what the setting does. In even older versions, click on the stack of books with the pair of spectacles on top.
If you're still stumped and the setting in question corresponds to a GCC option, you can look it up in the GCC manual. If it doesn't correspond to a GCC option, Google it.
All (as far as I can tell) of the build settings are documented in the Xcode Build Setting Reference, although some of these are more useful as output (e.g., environment to a shell script phase) than as input (actual settings). Indeed, a few of them, such as ACTION, only appear as output; you can't set them in the Info window, and wouldn't want to.
I'm just starting out with Cocoa development in Xcode, doing the hello world example. I'm up to step 6 of the section "runtime debugging", which is
Using the Step Over button in the debugger toolbar, begin stepping through the code. As each line of code executes, you can examine the program’s state. The value of a variable is sometimes drawn in red to indicate that the value was modified in the last step.
Notice that the debugger pauses before executing the indicated line. After each pause, you can add additional breakpoints or choose Debug > Restart to terminate the application and start a new debugging session.
now what I've been pulling my hair out for over the last hour is the fact that this debugger will only show me assembly code. I can manually select my source code file, but as soon as I click "Step over" I'm right back in assembler view. I can't for the life of me figure out how to turn the assembler off, and make it show me my source code!
I know this article is a hundred years old, but in case anyone is wondering how to address this issue in more recent Xcode versions (as opposed to Xcode 3), you'll find the appropriate setting labeled Always Show Disassembly under Debug>Debug Workflow in Xcode 6 and up. Ensure the option is NOT checked.
In Xcode 5, the option was labeled Show Disassembly When Debugging under Debug>Debug Workflow. Ensure that "Show Disassembly When Debugging" is unchecked.
Back in Xcode 4, the Show Disassembly When Debugging setting was found under Product>Debug Workflow. Again, ensure that the option remains unchecked.
This was driving me crazy, too.
NOTE: The information above is still valid for Xcode 14+. I've applied updates to this answer as new versions of Xcode have been released. Fortunately, the option has remained unchanged since Xcode 6 (so far).
There are two other things to make sure of:
That you're looking at one of your own functions/methods. If the stack frame you're looking at is a function or method from one of the frameworks, you're going to see assembly no matter how you have Xcode configured.
That you are running a Debug build. Strip debug symbols (as in a Release build), and you'll be looking at assembly even for your own code, no matter what.
I actually figured this out before I posted, but I wanted to save others potential future headaches, (and also in case I forget later) as I could not find the answer to this by searching stack overflow, but I did find that I'm not alone.
From the run menu, select "Debugger Display" > "Source Only", or "Debugger Display" > "Source and Disassembly"
On Eclipse, whenever I double click a tab, it fills the workspace (by hiding all other views like project tree, console, etc).
Is there any way to do this on Visual Studio?
Note: i'm not looking for full screen, just want a way to declutter the workspace but still have access to menus.
Are you after this?
Set shortcuts for the Window.AutoHideAll function and for the Window.ResetWindowLayout function. In order for the ResetWindowLayout to work, you have to export your settings (make sure you select "All Settings") with all windows expanded and then import them again.
ResetWindowLayout will restore all windows to the way they were the last time you imported your settings.
Not with double click on tab, but you can do the same with Shift+Alt+Enter key combination.
This keyboard shorcut was changed to F11 from 1.9.1 vscode version.
All keyboard Shortcuts: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf
I was looking for that, as well, and I now just got used to using full screen (Shift+Alt+Enter), which hides a little too much, which you seem to think, as well, but does in fact still show the menus.
Looks like drby got it on this one. Just FYI. I pinged the VS team to ask about this and here is the response:
"There is no way to reverse the command automatically. For it to work as a toggle we would need to save which toolwindows were auto hidden and which ones were not when the command was run, which we don’t do (it would cause lots of interesting persistence questions, across profiles and VS sessions)."
The idea of a "Unhide All" command is what I suggested. So if you hide all then you can unhide all as well. There might be some windows you don't want to unhide but the 1 or 2 extra windows is better than not having an unhide IMHO.