tags:

views:

42

answers:

2

I need to know what file a specific program read. (this specific program is based on .net).

Is there a recommendation for a good profiler?

A: 

Can you run the program under an IDE such as Visual Studio?

Are you asking what is the name of the file that the program spends most of its time reading?

If so, then the simplest way to find out is, while the program is running, halt it by pressing the "pause" button, and then examine what the program is doing.

If the pause occurs during the I/O, you will see that the call stack has "main" at one end, and a system I/O routine at the other end. In between, you will see the line where the I/O is called. Then just find the line where the file is opened, and you will be able to see the file name.

You may want to do this several times to make sure you catch the program in the process of that I/O.

Mike Dunlavey
+2  A: 

Take a look at Process Monitor, it can tell you exactly when and what files are opened and closed by any Windows process, read/write operations, etc.

Mauricio Scheffer
Nice tool. I don't except it yet, because maybe there is more tools.
stacker