开发者

Windows 7 /Eclipse watchpoint on file access

开发者 https://www.devze.com 2023-02-08 15:29 出处:网络
Is there a way in Eclipse [Helios] on Win 7 to watch for a file to be opened? Do I have to know where the app is going to do so, or is 开发者_运维问答there a way to watch for a java.io object being cr

Is there a way in Eclipse [Helios] on Win 7 to watch for a file to be opened? Do I have to know where the app is going to do so, or is 开发者_运维问答there a way to watch for a java.io object being created/something or other?

tia Rene


You could try setting breakpoints on the constructors of FileInputStream and/or FileOutputStream with conditions to check whether the filename provided matches your target filename (e.g. check the parameter on the constructors that take a filename, check the File.getName() on the constructors that take a File). Alternatively or in addition, you could set breakpoints on File constructors with a condition to check whether the specified filename is your target filename.

If your breakpoint trap trips, you can follow the stacktrace to see what methods are directly or indirectly access the file.

0

精彩评论

暂无评论...
验证码 换一张
取 消