How to run debugging on both device and browser?

How to do it? I want to debug on the device and on the web.