Modifying Running Code in Xcode Fix (found in the 'Run' menu) - iphone

I am attempting to use the 'Fix' command found in the 'Run' menu in Xcode to modify my running code without having to rebuild. I have read apple's documentation on it but following their
'typical fix-and-continue workflow:' (http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/XcodeDebugging/230-Modifying_Running_Code/modifying_running_code.html) doesn't seem to be working for me...
Here is what i am doing (from scratch):
- create view-based project in Xcode
- create click event to trigger a function that just logs some output
- run in simulator with debugger (command-Y)
- click 'pause' in the debugger.
- add another log (or some other simple change) to the function
- save modified code
- select 'Fix' from the 'Run' menu
- click continue and click button
The added log doesn't appear...

Not an answer, per se, but this "Fix and continue" system is disappearing in XCode 4. I wouldn't invest a lot of time in learning to use it, or developing a debugging strategy around it.

Related

Error in loading component: [JFrame]->Panel - Java NetBeans

So its been a while since I last touched the GUI for this application. Today I tried to open the main form and got this error message:
Note everything compiles/runs perfectly, I get no errors whatsoever.
It might be because you used to have a custom GUI window/panel/component and you modified that class. Now the IDE does not recognize it anymore, so just press "Not editable" button when NetBeans Shows you the dialog, then perform a "Clean and Build" (the broom and hammer icon). After build completes close and reopen the IDE. It worked form me.
It an error that append sometimes when you switch from a version to an other. I get the same issue, I got the message but all run well.
If you want more informations about the problem encoutered, go in :
(In the menu bar) View -> IDE Log
here you should see the details of the error when you get this Warning window.

Debug rhodes framework

I'm newbie to ruby and rhomobile.
I'm debuggind succesffuly using the simulator, I can set breakpoints, etc... All works fine except I can't debug inside the framework code.
How can I debug through the framework code in a rhomobile app? How can I configure rho studio so I can debug inside the framework?
I'm a newbie with ruby and eclipse.
More detailed:
My problem happens when I try to debug functions inside the framework. For example: I put a breakpoint in a model.find(:all). The debugger stops here, but when I want to debug then find method it doesn't enters it, it simply executes and continues in the next instruction. In keys terms, I want to make a step into, but it makes a step over. If it helps you, in edit mode, when I press control+left mouse button over a "Rho::RhoController" in a line like this: "class TestController < Rho::RhoController", it doesn't open /rhodes-3.2.1/lib/framework/rho/rhocontroller.rb, where the source code of this class is.
First you need to install rhostudio, once ure done with that. You need to run your application through Rhosimulator which is a really fast simulator than native blackberry, android & ios simulators.
Please follow these steps :
Select Run » Debug Configurations… from top menu
Find ‘Rhodes Application’ section on the left and add new (or modify existing) configuration
On ‘Common setting’ tab select a project by clicking ‘Browse…’ button next to ‘Project name:’
Select ‘Rho simulator’ as the platform
Click ‘Apply’ and then ‘Debug’
Its good that you have already added breakpoints in your .rb files which you can now view in log in Console window.

Running my program from PyDev with one click?

I am developing using the PyDev plugin in Eclipse. My program uses several classes in several files. I usually run the program using the green "play" icon or using Control+F11. The only problem is that it will run the file, which is currently in "focus". Usually this is not the one containing the starting point of my application. As I run my program something like 200 times a day, this means that I need 200 extra click on the mouse and often forget about this.
Is there any way of setting the default file to launch?
Yes, change the launching to rerun the last launched, so Ctrl+F11 will launch the last one -- and use F9 to launch the one with focus -- See instructions and details at: http://pydev.org/manual_101_run.html
For me, the shortcut is Ctrl+Shift+F9. I don't think I've changed any keybindings, so its strange that it would be different from the official documentation.
Go to Run->Run History, and select the run that is your 'main' run. Now you should be able to use Ctrl-Shift+F9 from any other file to rerun your main. If it isn't Ctrl+Shift+F9 for you, look on the console window that should be at the bottom of your screen showing the stdout after every run. There is an icon on the top of it that has the green start arrow with a yellow arrow underneath it pointing to the right. That is the command to relaunch with the same configuration. If you hover over that, it should tell you the keyboard shortcut you need.

Opening Xcode help file and application at the same time

I am noobs at Xcode. I am on my second day of learning.
When I start Xcode, the main window has a button for "Getting Started with Xcode" and a subsequent link for "Xcode workflow tutorial"
Now I would simply like the help to be open at the same time as the IDE so that I can read and code. I clicked on the Xcode icon that opened up the original instance, but that doesn't seem to do anything.
How do I get both things to stay open at the same time?
Follow these steps -
Step 1: On opening X-Code, this window turns up-
Step 2: On clicking Getting started with Xcode , gives -
Step 3: On clicking Start Developing with Xcode gives-
Step 4: On clicking the link - Xcode Workflow tutorial present in Write a Sample Application gives-
Notice that in all the process your Xcode menubar remains unchanged i.e.,
Now, Click on File(or Cmd + Shift + N keyboard shortcut) , and select New Project should pop up the windows as shown in Workflow tutorial. Select the application type, saving should bring you new Xcode project. Arranging the two windows side by side should look some what like this -
Now code while you learn from the Workflow tutorial :)
Hope this is helpful.
You can open the documentation window via Cmd-Option-? and search for Getting Started with Xcode there. The option to open the documentation is also under the Help menu.
I generally open a project first and then open the documentation afterwards, if necessary.

Xcode's Refactor menu is always disabled

For some reason Xcode's Refactor is always disabled. I used to be able to activate it via selecting a class name and right clicking in the editor to select it. But now no matter what I do, it remains disabled. Any idea what's going on?
Working with Xcode 5, I kept getting "Can't refactor during indexing" when trying to refactor. Rebuilding the index seemed to hang at "Indexing - Waiting for make" forever.
I then noticed that make was already used by another process on my machine (not by Xcode). Shutting this process down enabled Xcode to finally finish indexing
Your project's index might be out of date/corrupt. In the General tab of the Project Settings window, click Rebuild Code Index and wait until it's done.
You can check the progress of the rebuild in the Activity window (Window > Activity).
I just ran into a similar problem in Xcode. I could not refactor anything in the class's .m (implementation file). The only explanation I could come up with is that it was not indexing the file for some reason, and I could not force it to reindex. The only hack that I found that worked was to copy the file to temporary location, remove it from my Xcode project, copy the file from the temp location back to my project's location, and then re-add the file via Xcode.
None of these suggestions work for Xcode 3.2 - the ONLY way is to select the file you want to rename in the left Groups & Files column. THEN highlight the name of the .m or .h in the right code view, then you can right click and select Refactor!
For instance if you're changing the DetailViewController name, highlight the actual DetailViewController.h word in code.
Note, you should also always make sure you've selected the .h file, not the .m
I faced the same thing in Xcode 11. and this worked for me:
I changed iPhone 8 simulator to generic iOS Device and it worked when it is on Generic
I'm new in iOS development,I have met this similar problem.
Xcode:Version 7.1 (7B91b),it looks like Refactor not working:
But when I put my mouse on the red circle point in the following picture,and then the Refactor working.
I think this is a low level mistake,but may be a reference for someone.