Debugging with Fire and Water
Fire and Water provide sophisticated debugging support for all supported target platforms and all Elements languages.
Depending on the target platform, the debugged applications will run locally, on a remote computer (connected to via CrossBox 2 over SSH), or a physical device (Android, iOS Device or Apple TV) connected locally or to a remote Mac.
Please refer to the Working w/ Devices topic for more details on what options are supported, and how to select the appropriate device.
After selecting the target machine or device, the remainder of the debugging process is the same, for all platforms. You have several options to launch or deploy your application, available via the "Project" menu and corresponding keyboard shortcuts
- "Run" – the default option, selecting this will build your application, it (where necessary) to the target device, and then run it in the debugger. Most of the remainder of this topic will be focused on this option. (⌘R / Ctrl+R)
- "Run w/o Debugging" – selecting this will run your project, but without the debugger attached. You application will run as it would in production mode, without the overhead of the debugger, but also without its benefits. (⌘⇧R / Ctrl+Shift+R)
- "Deploy w/o Running" – where applicable (i.e. only for applications running on external devices, this option will , but not launch it. This is helpful to just get your app installed, if you want to launch it manually. (⌘⇧D / Ctrl+Shift+D)
- "Test" – builds and runs a test application in the debugger, but in a special Testing mode for EUnit unit testing. (⌘T / Ctrl+T)
- "Test All Projects" – builds and runs all test applications in the special Testing mode. (⌘⇧T / Ctrl+Shift+T).
There are three optional phases that might need to happen before debugging can start:
- (when using a remote computer) and/or
- (when using a device).
The IDE is smart about not repeating these preparational phases unnecessarily, for example skipping a rebuild or re-deployment if your application code has not changed between runs.
You will see the status of each of these phases in the top right corner of the, and also by its color-coding. The Jump Bar (and the application icon) will turn blue while building, and yellow when the debugs session starts. The status will show the different steps, and end up reading "Debugging", once the session is fully started.
You can also see the status (and more details about your debug sessions), in the Thread Pane and Callstacks, the fourth tab of the which can be opened via ⌘4 / Ctrl+4) or via the "View|Show Threads and Callstacks" menu item.
Once a debug session is active and running, you can use the debugger to control it, including the following features:
- Pause, Step, Continue
- Exceptions and Signals
- The "Threads and Callstacks" Pane
The "Debug" Pane
- The Device Log (Android only)
- The Disassembly View