开发者

Java debugging - Searching for a string in the package in a jar

开发者 https://www.devze.com 2023-04-11 06:02 出处:网络
I am debugging a Java package and I need to search for some d开发者_开发问答ebug statements being spitted out in the cmd to find out where in the code the program got stuck at.What type of search prog

I am debugging a Java package and I need to search for some d开发者_开发问答ebug statements being spitted out in the cmd to find out where in the code the program got stuck at. What type of search programs would you use to search for a debug message being printed onto screen in a large Java package? I tried using the ordinary Windows search using the "A word or phrase in the file" but I don't think it is doing it's job. Any recommendations?

Thanks.


To search for a string within a JAR (and include meaningful context) you can use the search (not find, which only works with a single class) function in Java Decompiler. How useful its output is will depend on whether the JAR has been run through an obfuscation tool.


In Eclipse, you can search your entire project or packages with Search -> File

but you should reconsider your debugging techniques, since there are better Methods than Printing to the CMD

0

精彩评论

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