1. A method of event sampling for an application, comprising: attaching a runtime optimizer to the application at runtime; running the application on a first computer having a runtime environment; recording a plurality of events during runtime, the recording of the plurality of events includes capturing an event type and number of occurrences for each of the plurality of events; recording a plurality of actions, the recording of the plurality of actions includes capturing a time mark at which each of the plurality of actions occurred; and creating an optimizer file including the recorded events, actions and time marks for the actions, wherein creating the optimizer file includes providing in the optimization file environment variables of the runtime environment of the first computer on which the application was run; reading the optimizer file to reproduce the runtime environment on a second computer system that is different from the first computer system; running the application for debugging on the second computer using the runtime environment and the time marks for the actions obtained from the optimizer file, the running of the application for debugging being executed using the second computer system without using performance counters of the second computer system, the optimizer file being stored on a non-volatile storage medium wherein the optimizer file includes an application definition information, and a log, the log includes summaries of the plurality of events and the plurality of actions.