I don't know if something like this is taboo or "copyright" territory so give a guy a break.

I'm wondering if there is some kind of program out there that would display (real-time) the coding for a running/selected program. For instance, I would be running Firefox and this other program would tell me all the coding details of what's happening on the programming level.

What I'm hoping to do is basically splice bits and pieces of programs together, as well as add individual custom code, giving me a program hybrid allowing things like; save+print, firefox opens 2 windows, etc...