weinre debug code for testing