I'm thinking along the lines of a Firebug for the iPhone/iPad/Android/BB that can truly give more insight on the markup/scripts.

Even when testing on the simulator/device, it's hard to truly simulate the exact rendering of the mobile browser. I know that browsers such as Safari and Firefox can simulate it via changing User-Agents but that's not a true simulation of the actual mobile browser.

I love this question. Mobile browser testing is the real wild west of testing technology right now - the best practices haven't been built yet.
– BruceMay 4 '11 at 6:42

I see lots of answers to the question, "What do I use to test mobile web apps?", but the actual question seems to be "What are some good tools for understanding what's going on in the mobile browser?"
– user246Dec 13 '12 at 16:06

My personal experience is with testing iOS devices so I can only refer to those. Your question is broken up into three separate parts so I will answer each of those in turn.

I'm thinking along the lines of a Firebug for the
iPhone/iPad/Android/BB that can truly give more insight on the
markup/scripts.

This is supported in iOS6 by enabling the "develop" mode on your phone. Under Settings > Safari > Advanced you need to set Web Inspector to on. You can then connect your phone to your mac, open safari and the web inspector that you access via the "develop" menu will show allow you to have similar functionality to firebug.

Even when testing on the simulator/device, it's hard to truly simulate
the exact rendering of the mobile browser.

This statement is not correct. When you are testing on the device, by definition it HAS to be the exact rendering. In the iOS simulator, you are running the exact code that is running on the device, and, retina displays aside, the rendering is 100% accurate also.

I know that browsers such as Safari and Firefox can simulate it via
changing User-Agents but that's not a true simulation of the actual
mobile browser.

That is correct. Firefox does not use Webkit as it's rendering engine, so changing the user agent will not show you how it looks on the mobile device. Whilst that is also true for the other Webkit based browsers (Safari and Chrome), they are usually pretty close. I would personally however just use the simulator. (That was not a viable option in the days before the AppStore where there was no iOS simulator, and we were all developing iPhone "web apps".)

Appium: Appium is an open-source tool for automating native, mobile web, and hybrid applications on iOS and Android platforms. Appium is "cross-platform": it allows you to write tests against multiple platforms (iOS, Android), using the same API. This enables code reuse between iOS and Android testsuites.

Serenity: Serenity is a powerful tool for creating automation scripts in Java, verification web applications, collecting errors and combining all the results into easy to read visual reports.

Robotium: This is test automation tool used for android app development in mobile.

Testing whiz: It supports testing for both android and iOS development on different browsers, operating system and emulators, it is powered by Appium and it allows for both native and hybrid mobile apps to complete functional level testing on real devices and simulators.

Espresso: It is the latest android framework that got open sourced by Google. It is easily available for developers and testers to hammer out UI and it is easy to learn.

Calabash: It is a framework for android and iOS native and hybrid applications, easy to understand and reduces syntax errors and it is used to create and execute acceptance tests for apps on both of these mobile platforms. Calabash tests are described in cucumber then converted into Robotium or frank in run time. It supports about 80 different natural language commands such as java or ruby.

SQAForums has a number of forums specifically dedicated to different tools and testing techniques. In their Mobile Apps - PDAs & Embedded Systems forum, they've posted a sticky thread that documents the current list of tools that have been compiled by users on those forums. As I understand it, the moderator of that particular forum keeps that list relatively up to date and is adding to it based upon comments by other members. That might be a good resource to go to in order to find a current list of tools.

One element to think about playing with is Selenium 2. It's a combination of the Web Driver and Selenium projects. I know internally we've been able to get the agent working for both iPhone and Android devices. That doesn't solve your Firebug issue, but it will give you a way to automate functional and ui tests against those devices.

When it comes to the Blackberry, we've struck out all over. My last research - admittedly done 3 months ago - revealed that Windows based emulators are the best way to test against apps that run on the RIM OS.

Ideally, in any given mobile project, hardware would be your best option, then emulators next. Device Anywhere is the bridge between emulation and real iron so it's really up to your company and what budget they have.

Using a desktop browser plug-in or user-agent switcher is not ideal for testing mobile web apps or web sites in general on mobile. It's just a bad idea.

If you need testing software that will run on your PC and simulate a variety of mobile devices, I'd recommend a 3rd party software built specifically for this purpose, not a browser's user-agent switcher.

One that I have some experience with, professionally and personally, is DeviceAnywhere. IMO, it's about as close as you can get without actually having each type of mobile device in your hand, though at times its response time can be on the slow side. Read about it here to see if it might fulfill your needs - I'm sure there are others out there as well but I don't have experience with them.

To simulate a specific browser (including mobile) using Chrome, all you need to do is override the "User Agent" to instruct the browser to use an agent specific to a device, either by selecting it from a list, or entering the user agent string directly. Steps:

Get Chrome if you don't already have it

Click the wrench icon on the top right

Goto Tools -> Developer Tools

Click the gear icon on the bottom right

Find the setting "Override User Agent", check it, and select the browser/device you want to emulate

Refresh your page and inspect it. This is how it will look on the device you chose. (You'll have to re-size the browser to a phone-ish size if you've selected a mobile phone device)

Don't see the user agent string you're looking for on the list? (Look here) for an extensive list of user agent strings, you can copy and paste into the free-form text box.

Next to all the tips you already got you could also try FRET for your mobile web testing. You define the tests online on the website (no coding needed) and run them on real devices in the cloud (mobile and desktop).

"For testing mobile mobile web apps or native mobile apps, the best solution I know calls SeeTest, It allows you to run mobile test
on iOS, Android, WindowsPhone and blackBerry. You can do parallel execution and integrate with CI systems. It is by far more stable and
comprehensive set of tools for testing any aspect of application. "