How to output step by step all found elements and results of functions?

How to output step by step all found elements and results of functions?

Assume I have a jQuery command like:


$('div[myattr="foobar"]').parent().remove();


How can I wrap (?) this command so that:

- all found core elements are listed (at the console)?

- all found parent() elements are listed (at the console)?

- the result after remove() is shown at the console ()?


Peter