Is there anyplace in the eclipse ide that I can enter immediate code while stoped at a breakpoint?
thanks
It's called the Display window in Eclipse. Menu Item: Window/Show View/Display
To run command you need to type then select the text in the display window and select one of the two J icons in the window.
Note: as mentioned in Debugging with the Eclipse Platform, you can use the Display View to scrapbook your live code.
Meaning, while you have a live debug session:
, you can run/debug some expressions or code in a Display view:
Example:
See My favorite Eclipse view
To execute the code and display the returned value, push the button with a "J":
If you just want to execute some code that doesn't return a value, push the button with an arrow ">" and a "J":
The standard output will be printed to the Console view.
Related
As you can see from the image above, every time I put my cursor to the end of curly brace, the related code (i.e. the one appeared on the left side of the image) pops up. This function is helpful when you want to see the beginning of the code snippet, but I don't want it to pop up all the time.
Does anyone know how to turn off this function in NetBeans IDE?
Go to Tools -> Options -> Editor and select General tab and uncheck Show tooltips. Click Apply and Ok.
I am using the Spyder which comes inside the Anaconda3 IDE. I found the Ipython Console here is very helpful in the sense that when I type in a function, the arguments and default values will come up automatically. When I used to use Jupyter notebook, there is no such functionality.
What I mean is like this:
When you just typed the function name and a left bracket, the Arguments help window just pop up.
However, my problem is that, sometimes, in the middle of this function completion, in this example, I finished typing bottom=a, but I forgot what should be passed to width, so let's say I pressed Alt+Tab in windows system to check it out in a PDF. Then I press Alt+Tab to switch back to Ipython console, but now the Arguments help window just dispeared.
My question is is there any shortcuts to make the it appear again? Typically, I just have to clear all my arguments, and go back to type the left bracket another time to make it appear to help me specify the arguments, but this is unkind.
Press shift+tab to get the argument window back.
Press ctrl+space to get the function window which appears after a dot (e.g. after "plt.").
Use the object inspector (renamed to the help window in later versions of Spyder). It gives the information you're looking for and much more!
In the main window, click on Tools -> Preferences -> Help -> Automatic connections -> check "IPython Console" and any others you'd like to use.
Go to the help tab which is defaulted to the top right of the main Spyder gui.
Click the gear on the top right of the help window and select "Rich Text"
Set the "Source" to "Console" on the upper left side of the "Help" tab.
In your IPython console, type plt.barh(.
Note the lock button next to the gear. This will lock the help window to the function while you continue to write code.
The button is shown in the debug view toolbar only (simple left-to-right arrow), not in the main toolbar. The action is mentioned in Debugger auto reload documentioan but there is no documentation about it in either Eclipse or PyDev documentation. Also, it is always disabled when code editor is in-focus.
I was actually looking for the Run To Line action which has no button in the PyDev debug view but I found that the shortcut (ctrl-R) works despite that the button is hidden.
It should be enabled in the debug view.
The Set Next Statement will set the next line to execute. It must be inside the same context (i.e.: same method and if inside a try..except it has to be inside that same try clause -- this is a Python limitation).
So, if you want in a debug session and you're in the middle of a function, you can just use the set next statement to be a different place, such as the start of your function.
There is perhaps a little more information on the pydev code mailing list:
We propose to add a new debugging feature in PyDev i.e. 'Set Next
Statement' wherein we will prevent the 'Set Next' target to be within
a 'For' or 'While' loop.
I'm working on some applications that, in debug mode, log to the console. I'd like to run and debug them from inside of Eclipse, and view the console for each one simultaneously. However, I have a single Console tab that shows a single Console output at a time. Is there a way I can split the consoles into multiple views so that I can have side-by-side console output?
Yes,
located near your console tab should be a button "Open Console".
If you click this button one of your options should be "New Console View".
You'll now have 2 console views.
One of your other buttons near your console tab is "Display Selected Console". When you choose this option you can select from any of your running applications.
Just select the tab, select which application you want it to watch, and repeat for the other tab.
You can then move your 2 console views to wherever you want independently of each other.
I'm using Eclipse Helios Release with build ID: 20100617-1415.
The best thing you can do is the following.
Window > New Window.
That will create another eclipse window like you currently have. Run the desired application, switch the console on the new window to display the desired console output with open console button on the console view.
A bit clunky but the only way to get multiple consoles at the same time. If your new windows doesn't have console open use
Window > Show View > Console
Goodluck
The post of Chase Henslee it's correct after click on 1, you must deactivate the second behavior with second step and at finish you can change the console with 3 step.
I can't seem to find a way to have the console run (to show NSLog comments) in XCode 4. The normal method for the previous version of XCode does not work. Does anyone have an idea of how to accomplish this?
You need to click Log Navigator icon (far right in left sidebar). Then choose your Debug/Run session in left sidebar, and you will have console in editor area.
for Xcode 5:
View->Debug Area->Activate Console
shift + cmd + c
If you just want to have the log output display when you run your app then you can go into XCode4 preferences -> Alerts and click on 'Run starts' on the left hand column.
Then select 'Show Debugger' and when you run the app the NSLog output will be displayed below the editor pane.
This way you don't have to select on the 'up arrow' button at the bottom bar.
The console is no extra window anymore but it is under the texteditor area. You can set the preferences to always show this area. Go to "General" "Run Start" and activate "Show Debugger". Under "Run completes" the Debugger is set to hide again. You should deactivate that option. Now the console will remain visible.
EDIT
In the latest GM Release you can show and hide the console via a button in the toolbar. Very easy.
Here' an alternative
In Xcode 4 short cut to display and hide console is (command-shift-Y) , this will show the console and debugger below ur text edior in the same window.
You can always see the console in a different window by opening the Organiser, clicking on the Devices tab, choosing your device and selecting it's console.
Of course, this doesn't work for the simulator :(
There's two options:
Log Navigator (command-7 or view|navigators|log) and select your debug session.
"View | Show Debug Area" to view the NSLog output and interact with the debugger.
Here's a pic with both on. You wouldn't normally have both on, but I can only link one image per post! http://i.stack.imgur.com/4gG4P.png
Here's an alternative.
In XCode4 double-click your Project (Blueprint Icon).
Select the Target (Gray Icon)
Select the Build Phases (Top Center)
Add Build Phase "Run Script" (Green Plus Button, bottom right)
In the textbox below the Shell textfield replace
"Type a script or drag a script file from your workspace" with
"open ${TARGET_BUILD_DIR}/${TARGET_NAME}"
This will open a terminal window with your command-line app running in it.
This is not a great solution because XCode 4 still runs and debugs the app independently of what you're doing in the terminal window that pops up.