Run Configurations vs Schemes

The way AppCode deals with running and debugging an application is slightly different from how Xcode does it, and from time to time we get questions on the whole run/debug configurations concept and various aspects of the behaviour. We decided to dot the i’s on this matter with this post.

What are run configurations?

You all work with Xcode schemes, and you know that a scheme defines a collection of targets to build, a configuration to use when building, and a collection of tests to execute.
Run configurations in AppCode are based on Xcode schemes and are kept synced with Xcode schemes.

So when you open your project in AppCode for the first time, as long as you had schemes in Xcode, AppCode will fetch them and you’ll have run configurations you can already use without need for further modification.
You can also create some new run configurations in AppCode and give them distinctive names.

How to create a run configuration in AppCode?

This one’s easy – you open Run | Edit Configurations from the main menu, and see a dialog where you already have some run configurations; to create a new one click the plus icon and choose the kind of configuration: application or test.

Say, we’ve created an Application run configuration, now we need to adjust the settings taken from the default one.

Note: The defaults are like templates, they are only applied when you create a run configuration, they do not affect in any way your existing configurations. You can modify the default configurations settings in the same Run/Debug Configurations dialog: they are stored under Defaults in the tree to the right in the dialog.

So what are the options you can specify in an Application run configuration?

  1. Name, naturally.
  2. Choose a target, if you have several targets in your Xcode project.
  3. Configuration – corresponds to Build Configuration setting in Xcode.
  4. Executable, Program arguments (arguments passed on launch), Environment variables – same as in Xcode.
  5. “Make application active after launch” option means that once the application is launched the focus will be switched to it, while AppCode will go to background.

Most of the options aren’t new, right?
Note, that run configurations that you create in AppCode are not transferred to Xcode on the fly – you need to restart Xcode if you want it to fetch run configurations created in AppCode.

How to run a configuration in AppCode?

There are several ways you can launch a run configuration in AppCode:

  • Choose a run configuration and destination (an iOS device or a simulator) in the Navigation bar and click Run icon.
  • Hit Ctrl+R to launch the configuration that is selected in the Navigation bar.
  • Hit Ctrl+Alt+R to invoke a popup with the list of configurations and choose the one you want to launch. In this popup you can use speed search, i.e. if you have a long list of configurations you can just start typing the name of the needed one, and the list will be filtered to the matching configurations. If you want to view the settings or edit a configuration you see in the popup, select it and hit F4. To open the Run/Debug Configurations dialog from the popup, hit 0.

The shortcuts for debug are similar – Ctrl+D to start debug session with currently selected run configuration, Ctrl+Alt+D to invoke popup and choose configuration to debug. Also you can switch between run and debug mode in the popup by holding Shift.

How to change target destination?

You can change the target destination from the Simulator to device and back from the Navigation bar or from the Run popup menu.

Why are there two different actions: run and debug?

In AppCode unlike Xcode run and debug are two different actions. The reason is simple – sometimes you might just want to run your application and see what it will look like for your end users. In this case you don’t need to stop at breakpoints, and you can use run instead of debug.

Hint: You can run several configurations simultaneously, but not on the same device, nor simulator. Why would you need that? For instance you might want to quickly run a test without stopping an application that is already running. Or, you may have a complicated multi-process application.

Stay tuned for further posts in which we’ll cover AppCode test runner and debugger.

The AppCode Team

Posted in Tips'n'Tricks | Leave a comment

AppCode 2.1 is here!

Hooray! AppCode 2.1 is finally officially available. We’ve spent all this time making it faster and more stable – we want you to feel comfortable in your IDE, be productive and know that you can rely on your tools of choice.
There were multiple improvements and 100 fixes in different areas, but one of the noticeable once is background indexing and indexing optimization. We’ve also polished code generation options and refactorings, and even added a new feature – warnings suppression (see detailed description in EAP blog post).

So, give it a try – use ‘Check for Updates…’ in AppCode’s menu or download the build directly and enjoy the most intelligent Objective-C IDE!
Note, that if you own an AppCode license, 2.1 is a free update for you!

Yours truly,
The AppCode Team

Posted in Announcement | 11 Comments

AppCode 2.1 RC2

Hi everyone,

we are releasing the second Release Candidate build today with the only change – updated LLDB that fixes occasional hangs and crashes during debug session startup on OS X 10.8.4.
Please let us know if you notice any problems with debugger in this build ASAP.

Download RC2 build and stay tuned for the release!

The AppCode Team

Posted in Announcement | Leave a comment

AppCode 2.1 RC with Xcode 5 support

Hey there,

as WWDC’13 is coming to a conclusion, you’ll undoubtedly want to try all these new features in iOS 7 and Mavericks; and we’ve worked flat out to deliver a build with Xcode 5 and OS X 10.9 support as quickly as possible. And here it comes, along with a few other improvements and fixes.

Worked hard as we might, there is still plenty of work to do to fully support new language features and tools in Xcode 5, and and we’ll publish updates regularly. Meanwhile, please let us know if you experience any issues in this RC build.

Please also note, that if you want to run AppCode on OS X 10.9, you’ll need to install Java 1.6.0_45 update provided by Apple.

You can download the build from EAP page as usual, or wait till the automatic update becomes available.

The AppCode Team

Posted in Announcement | Leave a comment

New AppCode 2.1 EAP build is here

Hello everyone!

We are glad to tell you that we have a new EAP build today for you with more optimizations and background indexing. This build even has a new feature in it: warning suppressing, see OC-2082.

While in most of the situations warnings from inspections are helpful and can point to various issues or potential problems with your code, every rule has an exception. In some rare cases you may decide that a warning is not relevant for a particular part of your code and you don’t want to see it popup again. Now, you have an option to suppress a warning – just hit Alt+Enter, select the inspection you’re not happy with, then hit right and choose whether you want to suppress this particular inspection for the whole file, method or just for this statement.

To suppress the “non-localised strings” inspection in batch mode, use Code | Inspect Code.

Of course, you can always change your mind, and remove the suppression for an inspection.

See the full list of changes, try the new build and tell us what you think! We also wish you to have a great time at WWDC’13 if you were fast enough to buy tickets.
Stay tuned for updates!

The AppCode team

Posted in Announcement | 4 Comments

AppCode 2.1 EAP opens today!

Hey fellows!

You have probably been checking your RSS-reader of choice for quite a while now, looking for some news from us? And here goes one:

We are opening AppCode 2.1 EAP today focused on performance and bug-fixes.
Among the most noticeable highlights are:

  • Background indexing and indexing optimization.
  • Better handling of project changes via external event, VCS.
  • Code generation and refactorings improvements and optimizations.

Here is the full list of fixes in this first EAP, and more fixes and optimizations to come.

AppCode 2.1 will be released in about a month and we invite everyone for thorough testing of the EAP – some regressions may still hide in the new indexer that we haven’t caught in our tests. Please keep an eye on the suspicious red code, ‘unused symbol’ inspection and refactorings’ behaviour. If you find indexing being slower, please let us know as well – we’ll try to tune the thread load.
As usual, problem reports are welcome in our public tracker.

OK, we’re delaying you no more – go ahead and try the new build.

The AppCode Team

Posted in Announcement | Leave a comment

AppCode 2.0.3 Update

Hi there,

today, we have a number of critical and not-so-critical fixes in the AppCode 2.0.3 update. In particular, debugging on a device should be much faster thanks to the updated LLDB framework.

Oh, don’t miss your WWDC’13 tickets, and vote for this critical issue!

The AppCode Team

Posted in Announcement | 2 Comments

AppCode 2.0.2 Update

Hey guys!

Another update is available – AppCode 2.0.2 with numerous critical fixes in various areas. In this build there’s also a small new feature: an ability to change organization’s name in Project Settings, see OC-5670.

Take a look at the list of fixes and download the build.

Earth Day
Don’t miss a chance to get 40% OFF AppCode or up to 50% OFF JetBrains Tools for personal use and support a good cause. Every personal license bought between April 15th and 22nd helps the environment by saving the endangered Atlantic Forest of Brazil.
Read more about it.

The AppCode Team

Posted in Announcement | Leave a comment

AppCode 2.0.2 beta: fixed typing performance

Hey guys!

We have a new update for you today – AppCode 2.0.2 beta that addresses a number of performance issues and regressions including a critical one: lags when editing macros. Due to the complexity of the issue we are publishing this build as a beta, as some other issues might arise.
If you have experienced problems with editing macros, we encourage you to give it a try and report new issues, if any.
In addition to this important fix, this build also contains a number of other improvements and fixes. Take a look at the list of changes and download the build.

Develop with pleasure,
The AppCode Team

Posted in Announcement | Leave a comment

C++ IDE: an April Fools’ Day joke?

Hey guys!

We hope you enjoyed our yesterday’s April Fools’ announcement and didn’t get your hopes too high about us creating a replacement for Google Reader. However, one of the things written there is actually true – we do have plans to create an IntelliJ-based C++ IDE at some point. The listed features are pretty close to what we have in mind, and you can notice that some of them are already implemented and ready to use in AppCode.

As the work is in progress, you can subscribe to get the latest news at the bottom of the features page and follow the AppCode blog to stay up to date.

UPDATE: ReSharper team is also working on introducing C++ support. You can find more details in ReSharper blog.

Stay tuned!

The AppCode Team

Posted in Announcement | 81 Comments