When debugging a regular flex mobile app on IntelliJ, I have been targeting
the iOS Simulator, instead of the Emulator(adl). I think the iOS Simulator
is only an option when on Mac. The problem I run across quite often, is that
I press the debug button without remembering to quit the iOS Simulator. This
causes an error, which is just a small waste of time, causing me to have to
find the iOS Simulator and quit it, then relaunch the debug session in
IntelliJ.
<http://apache-flex-development.2333347.n4.nabble.com/file/n47719/Screen_Shot_2015-06-14_at_12.png>
 

Adding a simple shell script as an external tool to check if the ios
simulator is running, and then kill it before launching the debugger, has
been a little time saver for me.

#!/bin/sh

if pgrep -l "iOS Simulator"
then
    pkill -l "iOS Simulator"
fi

I put the file online if anybody has a need for it.[1]

Just add it to IntelliJ as an external tool and then edit the debug
configuration to run the tool before "Make" in the "Before launch" section.

On a side note, which may also apply to Windows users, sometimes when using
the Emulator, I get a warning that the debugger is already in use, which
causes me to hunt it down and kill it so that I can start my new debug
session. Checking the box for "Single instance only" in the debug
configuration seems to reliably close the adl, eliminating the error of the
debugger already being in use.

[1]http://people.apache.org/~kmg/external_tools/kill_iOS_Simulator.tar.gz




--
View this message in context: 
http://apache-flex-development.2333347.n4.nabble.com/IntelliJ-external-tool-to-kill-iOS-Simulator-when-debugging-on-Mac-tp47719.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to