simulator for code execution

Jun 2, 2007 at 6:11 PM
Is there any tool which can simulate what ever happens when a line of code is executed. For example: when an object is created, How it is assigned memory and how it is destroyed?