How to connect Chrome with device using Vagrant


#1

I can compile and deploy my ionic app to my USB connected device. But
how can I connect and debug my app now with Chrome running on my host
machine? Because the USB connection is exclusively given to VirtualBox
running vagrant my Chrome cannot find my device. He only find it when I
halt my Vagrant machine.

How did others solve this?


#2

I haven’t used the vagrant setup yet(I already have everything installed on my os). But why cant you just connect it to chrome running on your host os and debug from there?


#3

Because the USB connection is exclusively given to VirtualBox

Vagrant is used for compiling, building, packaging and deploying to my device. Because it runs in a VirtualBox machine you have to forward the USB connection from the host system to the guest. If you do this your host system (e.g. Windows 8) cannot see and use the USB device because the guest system (e.g. Vagrant with Ubuntu) has the USB connection. Because of this your Chrome installed on your host cannot connect to your Android device. He simply cannot see the USB connection.


#4

I meant he could stop trying to forward the usb connection to the virtual machine. So that he could connect it to the chrome on running on his host os.


#5

So I have to halt vagrant, debug my App with Chrome, start (up) vagrant, develop and deploy, halt vagrant, debug my App, start vagrant and so on?


#6

Why would you need to halt vagrant? Just dont let the usb connect to your virtual machine. You could go debug on different computer for all it matters you just need the right ip set for any rest endpoints after you install the app.

Also if you want to avoid all this it really isnt that hard to set it up your self on your host os.


#7

I believe I don’t understand what you mean.
If I disable USB connections on my Vagrant Guest (Build Machine) how can I make an “adb install” on that machine? Without USB connection it cannot see my Android device connected via USB cable on my Windows host.


#8

Did you ever solve this? I’m attempting the same thing.