Android ADB

Getting Android to connect to your desktop

You will need to install Android Debug Bridge (adb) onto your desktop machine.

Configure Android

First off you need to enable Developer options.
Go to Settings -> about device, scroll down until you see version.
Click on version and you will see an item called version no. 
Tap on this 7 times to enable developer mode

Connect Android via USB

Directly connect your Android device to your machine using a USB cable
On your Android device, drag down the screen to see the notifications.
Select system UI, choose the option to allow data transfer, e.g. "file transfer / Android Auto"

On your Desktop

Check that your device is detected and run up the adb bridge 
adb devices
You should see your device (usually by serial number) appear. You can find your device's serial number in settings -> about device -> status
Run adb reverse socket using a port number of your choice.  I've chosen port 3000
adb -d reverse tcp:3000 tcp:3000

Chrome browser

The easiest way to get this up and running is to have the same version of Chrome browser on both your desktop and Android device.
Open Chrome on your desktop and then this URL in a new tab:

chrome://inspect/#devices
Ensure that Discover USB devices is checked.
Refresh the page and if your device is connected via USB, you should be able to see it listed below.

Click on inspect to see the phone screen in a separate window on your desktop.  You should see the screen mirror the actions that you take on your android device.  All the usual browser debugging tools are at your displosal.