I'm trying to see what the value of myImage.height is in the debug mode in Xcode, I've got a breakpoint on this line...
float s=myImage.height/cos(30*M_PI/180)/2;
It all runs fine and get's to that line, in the debug panel I can see myImage (my Image is a Sparrow framework SPImage object) but I can't see any values for any of the class vars.
This is literally the first time I've used a break point/debug panel in xcode so I'm probably just not doing something right.
I also tried
NSLog(#"myImage height: %f",myImage.height);
But I can't see that being outputted in the output panel either.
I'm coming from a AS3 background, where you would see...
myImage.height along with it's value to the right in the debug panel in Flash, so I'm looking for the same thing in Xcode. Do I have to run it in a different mode or is there another panel to open or something?
In the console area, you can show 2 distinct "parts", one is the variables in scope, and the other is the actual output console. In the stack area, you can see all variables in scope.
You can also hover your mouse over any variable in code, then click on the little disclosuer arrow and select "print description" to have it plop it into the console. (The console is also where NSLog stuff goes).
Check out this picture:
And then this one:
Note you can also "print description" from the variable area:
edit here's more detail on the hover-access to the value: Click on the variable name, then move the mouse to the right, and there should pop up a yellow bar with info about the instance. This is is different from the little blue arrow, which is available even when not debugging.
If anything is being outputted, it's in the bottom panel. There are three icons on the top right of the bottom panel, and each one shows different data views. Try all three. In case you can't see the bottom panel, you can show it with the middle button in the segmented control above the word "View" in the top right of your XCode window.
Related
In IntelliJ, when a breakpoint suspends an a program.. If I hover over a variable with the mouse cursor and wait for a second or two, a tooltip appears, which lets me inspect the variable by clicking the + sign. For example in the below image, I kept my mouse cursor over three for a second or two and the tooltip saying Main$Die#452 appeared.
Is there a way to show this tooltip only by using the keyboard and the current cursor location? In other words, in the screenshot above, how would I see the tooltip for the variable one (where my keyboard cursor is) without moving the mouse cursor over the variable one? (And how would I expand it once I see the tooltip?)
While debugging code, I realized I end up inspecting objects like this very often and moving around the mouse and waiting for the tooltip to appear starts to slow down the process a little.
The action is called "Quick evaluate expression":
You can invoke it via alt+⌘+F8 on macOS, or ctrl+alt+F8 on Windows
I'm using AutoIt to automate the handling of a proprietary Windows EHR application, and it looks like the creators of the application wrote it without adding classes, IDs, or names to any of their links or menu items inside the application. The application I'm trying to automate is PrimeSUITE by Greenway Health.
I've gotten it to work by using MouseClick and adding coordinates, but that only works so long as the user doesn't move the Window. I'd like to use the more reliable ControlClick method to send click commands (I don't think there's a third way to send click commands in AutoIt).
Luckily, there's a keyboard shortcut built into the application to open the menu item I want in a new window. This is how I'm currently having to access the menu item:
WinActivate(": PrimeSUITE -- #CompanyName# -- PRIMESUITETEST")
Send("{F7}")
WinActivate("Report Selection -- Webpage Dialog")
WinWaitActive("Report Selection -- Webpage Dialog")
At this point I have to rely on the window's position on the screen not moving, so that I can send MouseClick coordinates (whose origin point begins in the top-left corner of my monitor screen, rather than the current active Window's top-left corner).
I'd like to be able to activate it somehow like:
ControlClick( ": PrimeSUITE -- #CompanyName# -- PRIMESUITETEST", "Reporting", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "left", 1, 491, 15)
So that the coordinates are relative to the active window's top-left corner rather than the monitor screen's top-left corner.
For context, this is what I see when I am hovering in the application's main window (note, the application is run from the desktop; it's not a web app accessed in IE), no matter which part, regardless of whether I'm in a blank space or hovering a link/menu item:
But as soon as I hover over a menu item and then move the cursor to a submenu item, I get this:
Here is the Tree View of what Inspect.exe found:
Am I going to be stuck with the MouseClick method via screen coordinates, or is there a way to use ControlClick or some other way to send clicks programmatically?
Even though it is a desktop application it is using IE objects. You can attach to it with _IEAttach and then use _IEAction to click on objects like your menu.
Here is an example of how to attach to PrimeSUITE (you may need to change the window title).
#include <IE.au3>
$hWin = WinGetHandle("PrimeSUITE")
If WinExists($hWin) Then
$oIE = _IEAttach($hWin, "embedded")
_IELoadWait($oIE)
MsgBox(262144, "", _IEBodyReadHTML($oIE))
Else
MsgBox(262144, "", "Window not found.")
EndIf
Once you are attached you can look at the HTML to see how you want to automate the program. You have a lot of IE functions besides _IEAttach that you can use. For example: _IELinkClickByText, _IELinkClickByIndex, _IEFormElementSetValue, and _IEFormElementOptionSelect.
The default layout has the debugger and console on separate tabs. I see that I can pop the Console as a floating window and even add it as a tab to the "Variables" or "Watches" pane in the Debugger tab. I'd like to have a layout that displays the Console and Debugger information at the same time (like a split pane, or a separate pane on the "Debugger" tab because it is useful to see the output to console while stepping through the debugger.
Any suggestions on how this can be accomplished? I'm using IntelliJ 13.1
All you can do is to drag one of the window icons(either debugger or console) to the other window and put onto the portion as you want. There will be purple highlighted box. This is how my debugger/console windows look like:
Just like this question here:
IntelliJ: After hiding my "Output" sub-panel within the "Debug" panel, how do I get it back?
I canno get the log/console viewer back in debug mode.
The suggested solution in the given question no longer works the "restore layout" button does nothing, and the "certain spot" on the debug is extremely vague at best.
Is there a way to retrieve the console if it gets vanished (or better yet, just stop that button for vanishing it from even existing)?
I am using IntelliJ 12 Ultimate. If the restore layout didn't work for you either, this should fix the problem:
Open the Debug panel.
Keep mouse on the Debug tab and move it straight right to the Watches icon.
You may see a few more more icons here, and Output may or may not be visible (not visible for me)
If visible, click it and the Output view will be restored.
If not visible, move your mouse slowly to either side of the Watches icon and an empty block would highlight indicating that you are hovering over an icon. There may be several of these. Use tooltip to figure out which is Ouput and click it.
Worked for me, I hope it works for you too.
click the button on the left of Debug View called "restore layout",then the console will go back in the Debug View! 1
Syed explained it pretty well, but a picture could be even better:
A view can be hidden via its context menu, then restored by clicking the corresponding icon (with red circle) to the right.
You can restore the layout using this button as of 2018.1.8
In 2016.2, I had to re-run in debug mode for it to reappear. I could not find a way to un-hide the console in the debug window.
You don't say which version of IntelliJ you're using, but I've just tried this in version 12 and the console window minimises to the far right of the debugger tabs. Look at where it says 'Debugger' and then eyes right until you see one or more icons over the Watches panel. Try clicking on them. If you're not using version 12, then only god can help you :)
In v. 2020.1 there is Layout Settings on the top right corner of Debug window
I've just spent an hour trying to get my console output back, and although this answer didn't solve it, it did help.
I'm on Intellij 11.1 Ultimate Edition, and Restore layout didn't help. Nor did I have any icons above the Watches window in the debugger, but I clicked around above the Watches anyway - and suddenly my console output was restored.
I've tried clicking around there again to see if I can provide more concrete steps, but without success. Can only suggest you keep clicking till it reappears.
I have a bunch of docked figures in matlab. Each one shows up as a tab in the document bar. This is the bar that runs along the bottom of the figures window with a tab for each figure. This bar can be easily moved by clicking on the anchor and moving it to the left, right or top. From the matlab help it says...
"Move the document bar.
Do one of the following:
Drag it to another location.
Select a new location from the Desktop > Document Bar > Bar Position submenu."
My question is, how can I do this with a command/script/code?
I have never tried to move the dock bar but I have done some similar messing about with the command window when creating a gui. For example:
function SetCommandWindowDocked(docked)
j_desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
cmd_win = j_desktop.getClient('Command Window');
j_desktop.setClientDocked(cmd_win,docked);
end
I used Yair Altman's matlab utilities to sniff out the right objects/methods to use, see matlab fileexchange.