In Xcode, can you recompile part of an app while it's running but paused at a breakpoint? - xcode4

In Xcode, can you recompile part of an app while it's running but paused at a breakpoint?
I thought that there was a way to do this. I thought I remember hearing that Xcode 4 would have this ability, or something like this.
It would also be useful if I could change the value of a variable while the app is paused, to narrow down where a bug is happening.
It seems unlikely that this is possible to do, but I thought at least I'd ask, if for any other reason than just to get my daily serving of humble pie :D
(I am compiling my app for iOS.)

Wow that would be nice! I am going through the Standford course right now and the teacher specifically says that if you change the code or any work that requires compiling you must recompile the whole project.
So assuming he is correct, I doubt that this is a current feature in xCode. Hopefully they will add something like this though!

Related

Eclipse CSS Editor "Unknown property" after LESS nature mess

I'm done with googleing, I have to ask you folks...
I have a static web project (not JavaFX, thus no JavaFX toolkits!) in Eclipse Kepler. Now thats the messy road I went:
I created a .less file (for the first time)
Eclipse starts nagging with the "Do you want to add the LESS-project nature?"-popup
I clicked 'no' 10 times (pops up every time I start Eclipse)
then I clicked 'yes' to add the nature for making this stop (could not find ANY workaround for that #$%!+"* !)
Now I face this travesty:
The built in CSS-editor marks every trivial property as unknown. I have no clue how to fix this. I removed the less-nature and restored my old .project file too but the warnings (and even real errors) persist. I found out that rewriting the properties does not summon these warnings!
No, I won't rewrite ~6000 lines of css...
Please help. Please make it stop...
Sorry, found the solution (dumb as can be):
delete project (only!) in Eclipse
re-import project (which completely revalidates the project structure)
errors are gone...
Although this solved my problem, I feel uneasy about the fact that I could not find any possibility to do a complete re-validation without to delete and re-import my project. This is pretty nasty...
Right click project Configure->Remove LESS nature.

No signals emitted from QTableView

For some reason, my QTableView seems to never emit a single signal. At first I tried connecting to any slot programmatically, but then I realized even through the Signal/Slot Editor from the GUI I could not make something happen, no matter which signal or slot I chose.
One detail that I noticed after a lot of research was that the Qt Documentation specifies that "The signal is only emitted when the index is valid.", so I understand this may be a problem with my models.
However, I still have no idea what might be the issue, or how I can fix it. Displaying the cells work perfectly fine on all models I have, but none of them seem to provide the correct signaling behavior, so I can't really detect the problematic code to post it.
It might be relevant to note, I tried disabling editing, and I'm testing this on Mac OS X Lion 10.7.5.
I appreciate any help. This is my first question here, although I've long benefited from those asked by others. So, yes, I've thoroughly searched for solutions.
Okay, I finally figured it out. After I realized Qt Creator was never updating the executable, no matter which code I changed, it was simply a matter of manually cleaning the build directory. Using the GUI options to do so (either rebuild or clean+build) hadn't had any effect. I guess it's because I had renamed the project, but didn't update the build directory or something. I had changed (improved) so much code since then that I would never have guessed there was an issue as everything was working fine, until I decided to add some more functionality.
As I had expected, this is kind of underwhelming for my first published issue, but I don't think it deserves negative points. The reason I didn't post some self-contained code is because I had no idea which code was causing the issue; I suppose I was just expecting someone with more experience to point me in the right direction. In the end, it wasn't even an issue with my code, it was with Qt Creator, so I really couldn't have been clearer.
I'll keep this as it might be useful for other people, so
tl;dr Qt Creator was silently failing to recompile the code, and the solution was to manually remove the old binaries.

Grails: Images / CSS missing from time to time

While developing a website I experience a weird bug.
From time to time my images or my css are missing.
It's not really predictable and therefore not reproducible.
Usually it happens after I edit my css, save it and reload the page (in the browser).
It's always syntactical correct CSS, so no compilation erros or anything similar.
I think it's the way Grails updates the running application, but I really can't say why or where it happens as it is quite rarely, but definitely annoying.
It doesn't matter if I run the application with my IDE (IntelliJ 9.0.4) or with the commandline (Windows).
The only thing I did not test so far is whether it happens only when I use the IDE or not.
Did anyone experience this?
EDIT:
Sorry for an unclear description:
"missing" means the browser is unable to load the corresponding ressource: "The Ressource () is not available"
Another Edit:
Thanks for the comments so far.
In addition to my main css-file and my images, which change quite frequently, my reset-css-file disappeared. I never touched it since creation, so I think one can exclude the compilation-script as cause of this mess. (further info in the comments)
Like John Smith I arrived here googling for this problem.
But I found another solution, and i hope that it helps you too.
I googled a little bit more and found this discussion Disabling static resource stuff, here i found a contributor of grails application, and author of Resources Plugin, Mark Palmer (take a look his website), telling what he is doing and answering the questions about this plugin.
Today, all you need to do is to update the Resources Plugin to version 1.2-RC1 or a recent one that will fix this problem.
When you say missing, do you mean that the changes are missing, or the whole stylesheet is missing? If it is just your latest changes, it is possible that your browser is caching the previous css file and isn't getting the latest changes. Try doing a "hard refresh" with something like CTRL+F5, or whatever hard refresh is in the browser that you are using. This will force a pull of the latest resources.
Really old question.. but for anybody googling this - I had similar issues with my CSS because of Windows file format on the Linux systems. Once I changed the format to unix, I still had to restart the server for the css to download. Note that somehow the css were downloading earlier although the format was windows and the issue was intermittent.

XCode 4 breakpoints not breaking at correct line

My breakpoints have stopped working properly in the latest XCode 4 release. With no change to the project settings, the breakpoints no longer break at the line they are set.
For instance, in one function I can set a breakpoint anywhere within it's body, but the code will always break at the last line of the function.
In another instance, I can set a breakpoint anywhere in one function and the code will break at a line in the middle of a different function in the same file! Tracing through after the break shows that it did break in the wrong place and it's not just a file / debugger sync issue.
I have no idea why this has started. It did however seem to start on new breakpoints while old ones worked. Any new breakpoints I add break in the wrong place. And recently, some files now don't even break at all! I can only assume the breakpoint is so wrong it's moved into code that's not called. I have done numerous internet searches and forum searches for this problem, and although I have found people with similar issues, there was either no solution or the solution listed (rebooting device, swapping debug output, turning off optimization etc.) haven't worked for me.
It is worth mentioninig I'm mostly coding in C++ using .mm files. For the past year of development in XCode 3, and for the last few months in XCode 4 things have been fine! I have debug set up correctly. No optimization on a debug run, no dead code stripping and I'm using the LLVM compiler 2.0 with DWARD with dSYM debug file. However, changing these values makes no difference.
Please help, it's driving me mad!!
An update to this. It's started happening again on a brand new machine with a fresh Lion and xcode install. The whole editor is out of whack. Example below of the errors appearing on the wrong lines.
From what I've read all around, Xcode tend to get confused with breakpoints and the way to get rid of the out-of-sync problem is to clean the "Derived Data"; two ways of cleaning it so far I've found (instructions are valid for Xcode 4.x) :
a) go in the organiser, under the Projects, choose your project and hit that delete on the Derived Data
or
b) go in the Product menu, hold the ALT button on the keyboard and observe that the menu are changing... so the clean transform to "Clean Build Folder..."
With-in "Build Settings" under the project target change the "Optimization Level" for "Debug" to "None".
I found that this fixed the issue for me.
I have fixed this, although I haven't found the root cause.
I removed the references from the project for the files that were not working with breakpoints. I then did a full clean and went into the folders and deleted any build and temporary data. I then opened the project bundle and deleted all data except for the project file itself. I then compiled so it threw up errors due to the missing files. I then put the files back in the project.
Now, the exact same files work fine with breakpoints!
No idea why but happy it's fixed.
Have you cleaned your targets? Shift-Cmd-K.
This started happening to me after I upgraded to XCode 4. I just deleted all breakpoints, did a clean, then re-added my breakpoints. Seems to work OK now.
I have figured out why this happens now. As mentioned in one of the replies you can fix it by deleting the derived data. This will always fix the problem. The editor for some reason loses it's relationship between the source code and the markup of the code it uses to cross reference breakpoints and errors etc. Deleting the derived data forces it to recreate this.
I believe that this only happens with files using C or C++ code. Apple seem to ignore C++ developers on iOS. I know a lot of professional game developers and every single one uses C++ to write games. Apple's lack of support is annoying.

Does anyone use Silverlight.FX with Silverlight 3?

I started looking at Silverlight.FX by Nikhil Kothari to replace Prism/Unity with our Silverlight 3 project.
So far I like the code layout and structure. It looks well thought out.
But I can't get a lot of the samples working due to a System.Reflection.AmbiguousMatchException. Anyone else seeing this? Should I not be using this framework with Silverlight 3?
I'm using the framework with Silverlight 3 without issue. Referencing the pre-built dlls works for my project but I haven't tried compiling the source myself. Have you tried using the dlls?
After some heavy debugging this error is coming because some of the class names that Nikhil used I believe are now in Silverlight 3 beta 1. In the TaskList example the ListView's DataTemplate has a HoverEffect
<fxeffects:ColorFill FillColor="#406795D1" Duration="0:0:0.25"/>
This is the one causing all the problems I saw. Removing this took away the AmbiguousMatchException.
Well, that is avoiding the problem, not solving it. It looks like the problem is much deeper, and anything that uses classes that derive from the Effect base class is broken. That makes the use of Silverlight FX pretty boring.
I have tried to use the lib in the past, and had issues with it. While Nikhil Kothari is amazing in the things he has worked on, and his technical abilities, I find that he is not so responsive to solving issues (BTW, someone already posted this problem on his blog, without his response). I do not want this to sound like a knock on Nikhil, it is just something you need to consider when using open source for real-world projects.
I sure hope someone can figure out what the deal is with those classes, I have spent many hours debugging, without solving the issue.
I tried the Amazon Store sample and the TaskList sample using the latest version of the library (3.1 built against SL3), and samples seem to work fine, including the ColorFill effect.
I did rename the Effect class to AnimationEffect which you'd need to avoid the ambiguous API compile error you'd see if you tried to recompile the sources... but precompiled binaries would have been fine. Not sure I see why you'd get a runtime reflection issue however.
Sorry, I know it can be frustrating to not see a response/fix immediately, but theres just too many things going on esp. before a release. My hope is having the source around at least enables you to debug into/break into so at least one is not completely blocked. Yes, I realize its suboptimal, but at the same time it is the reality, as Noam pointed out... :-(

Resources