Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Chrome debugger from stealing focus in React Native

Tags:

react-native

I use Chrome Debugging and Live Reload to debug React Native applications. Whenever you save a file, the Chrome screen reloads and in doing this, gets focus. This is annoying. Is there anyway to disable this focusing behaviour?

like image 424
Marc Avatar asked Jun 08 '15 14:06

Marc


1 Answers

The Chrome debug page is opened by the launchChromeDevTools.applescript script in the react-native package.

You can disable it grabbing the focus by opening this file in your project:

./node_modules/react-native/packager/launchChromeDevTools.applescript

and commenting out the activate line by inserting -- in front.

(This annoyed me enough to hunt down how to do it; it might be worth filing an issue on react-native to make it an option).

like image 189
rjpower Avatar answered Oct 06 '22 10:10

rjpower