Debug Mode parameter
--debug or--frontend_debug--debug
For example, we analyze iOS projects in debug mode:
Infer--debug-i--xcodebuild-target helloworldapp-configuration debug-sdk iphonesimulator
Starting analysis (infer version v0.1.0) make-k-j 4/users/wuxian/downloads/infer-osx-v0.1.0/infer/infer/bin/inferana lyze-allow_specs_cleanup-models/users/wuxian/downloads/infer-osx-v0.1.0/infer/infer/bin/. /lib/java/models.jar-developer_mode-html-dotty-print_types-trace_error-project_root/users/wuxian/downloads/ Infer-osx-v0.1.0/infer/examples/ios_hello-results_dir '/users/wuxian/downloads/infer-osx-v0.1.0/infer/examples/ Ios_hello/infer-out '-cluster xcl1.cluster >cl1/users/wuxian/downloads/infer-osx-v0.1.0/infer/infer/bin/ inferanalyze-allow_specs_cleanup-models/users/wuxian/downloads/infer-osx-v0.1.0/infer/infer/bin/. /lib/java/models.jar-developer_mode-html-dotty-print_types-trace_error-project_root/users/wuxian/downloads/ Infer-osx-v0.1.0/infer/examples/ios_hello-results_dir '/users/wuxian/downloads/infer-osx-v0.1.0/infer/examples/ Ios_hello/infer-out '-cluster xcl3.cluster >cl3/users/wuxian/downloads/infer-osx-v0.1.0/infer/infer/bin/ Inferanalyze-allow_specs_cleanup-models/users/wuxian/downloads/infer-osx-v0.1.0/infer/infer/bin/. /lib/java/models.jar-developer_mode-html-dotty-print_types-trace_error-project_root/users/wuxian/downloads/ Infer-osx-v0.1.0/infer/examples/ios_hello-results_dir '/users/wuxian/downloads/infer-osx-v0.1.0/infer/examples/ Ios_hello/infer-out '-cluster xcl4.cluster >cl4/users/wuxian/downloads/infer-osx-v0.1.0/infer/infer/bin/ inferanalyze-allow_specs_cleanup-models/users/wuxian/downloads/infer-osx-v0.1.0/infer/infer/bin/. /lib/java/models.jar-developer_mode-html-dotty-print_types-trace_error-project_root/users/wuxian/downloads/ Infer-osx-v0.1.0/infer/examples/ios_hello-results_dir '/users/wuxian/downloads/infer-osx-v0.1.0/infer/examples/ Ios_hello/infer-out '-cluster xcl2.cluster >cl2 echo "Analysis done" analysis done 4 files analyzed/users/wuxian/do Wnloads/infer-osx-v0.1.0/infer/examples/ios_hello/helloworldapp/appdelegate.m:20:error:memory_leak MEMORY Dynamically allocatedTo Shadowpath-Cgpathcreatewithrect () at line, column-is-not-reachable after line, column 5/users/wux
Ian/downloads/infer-osx-v0.1.0/infer/examples/ios_hello/helloworldapp/appdelegate.m:25:error:resource_leak Resource acquired to FP by call to fopen () at line, Column 8 was not released after line, column 5/users/wuxian/dow Nloads/infer-osx-v0.1.0/infer/examples/ios_hello/helloworldapp/appdelegate.m:29:warning:parameter_not_null_ CHECKED Parameter callback is isn't CHECKED for null, there could bes a null pointer Dereference:pointer callback could b e null and is dereferenced on line, column 5/users/wuxian/downloads/infer-osx-v0.1.0/infer/examples/ios_hello/hellow Orldapp/appdelegate.m:34:error:null_dereference Pointer str Last assigned on line could was NULL and is dereference D at line, column 12/users/wuxian/downloads/infer-osx-v0.1.0/infer/examples/ios_hello/helloworldapp/ Appdelegate.m:39:error:premature_nil_termination_argument POInter STR last assigned on line could is nil which results in a call to Arraywithobjects:with 1 arguments instead of 3 (nil indicates the last argument of this variadic method have been reached) at line, column 12/users/wuxian/down Loads/infer-osx-v0.1.0/infer/examples/ios_hello/helloworldapp/hello.m:20:error:null_dereference pointer Hello Last assigned on line could be null and was dereferenced at line, column 12/users/wuxian/downloads/infer-osx-v0.1.0 /infer/examples/ios_hello/helloworldapp/hello.m:25:warning:ivar_not_null_checked Instance Variable Hello _ Hello isn't checked for null, there could was a null pointer dereference:pointer Ret_hello last assigned on line could Be null and was dereferenced at line, column 12/users/wuxian/downloads/infer-osx-v0.1.0/infer/examples/ios_hello/hell oworldapp/hello.m:30:warning:parameter_not_null_checked PARAMETER Hello isn't CHECKED for NULL, there could bes a nul L Pointer dereference:pointer ret_hEllo last assigned on line could be null and is dereferenced at line 12
The process of output will have more and more detailed wash printing out, and in the results directory will generate more files, more than a few. dot and. html suffix files.
58demacbook-pro:infer-out wuxian$ tree. ├──bugs.txt├──captured│├──appdelegate.m.d2ac││├──appdelegate.m.cfg││├──appdelegate.m.cg││├─ ─appdelegate.m.stats││├──appdelegate.m.tenv││├──appdelegate_application:didfinishlaunchingwithoptions:.do T││├──appdelegate_application:didfinishlaunchingwithoptions:.html││├──appdelegate_applicationdidbecomeacti Ve:.dot││├──appdelegate_applicationdidbecomeactive:.html││├──appdelegate_applicationdidenterbackground:.do
T││├──appdelegate_applicationdidenterbackground:.html││├──appdelegate_applicationwillenterforeground:.dot ││├──appdelegate_applicationwillenterforeground:.html││├──appdelegate_applicationwillresignactive:.dot│ │├──appdelegate_applicationwillresignactive:.html││├──appdelegate_applicationwillterminate:.dot││├──ap Pdelegate_applicationwillterminate:.html││├──appdelegate_memory_leak_bug.dot││├──appdelegAte_memory_leak_bug.html││├──appdelegate_npe_in_array_literal_bug.dot││├──appdelegate_npe_in_array_literal _bug.html││├──appdelegate_parameter_not_null_checked_block_bug:.dot││├──appdelegate_parameter_not_null_che Cked_block_bug:.html││├──appdelegate_premature_nil_termination_argument_bug.dot││├──appdelegate_premature_ Nil_termination_argument_bug.html││├──appdelegate_resource_leak_bug.dot││├──appdelegate_resource_leak_bug. Html││├──appdelegate_setwindow:.dot││├──appdelegate_setwindow:.html││├──appdelegate_window.dot│ │├──appdelegate_window.html││└──nodes││├──node207.html││├──node208.html││├ ──node209.html││├──node210.html││├──node211.html││├──node212.html││├──nod E213.html││├──node215.html││├──node216.html││├──node218.html││├──node219.h Tml││├──node220.html││├──node222.html││├──node223.html││├──node224.html││├──node234.ht Ml││├──node235.html││├──node236.html││├──node237.html││├──node238.html│ │├──node239.html││├──node240.html││├──node241.html││├──node242.html││ ├──node243.html││├──node244.html││├──node245.html││├──node246.html││├── Node247.html││├──node248.html││├──node249.html││├──node250.html││├──node2 51.html││├──node252.html││└──node253.html│├──appdelegate.m.d2ac.html│├──hello.m.d2ac│
│├──hello.m.cfg││├──hello.m.cg││├──hello.m.stats││├──hello.m.tenv││├──hello_hello.dot ││├──hello_hello.html││├──hello_ivar_not_nullable_bug:.dot││├──hello_ivar_not_nullable_bug:.html│ │├──hello_null_deReference_bug.dot││├──hello_null_dereference_bug.html││├──hello_parameter_not_null_checked_bug:.dot││ ├──hello_parameter_not_null_checked_bug:.html││├──hello_return_hello.dot││├──hello_return_hello.html│ │├──hello_s.dot││├──hello_s.html││├──hello_sethello:.dot││├──hello_sethello:.html││├─
─hello_sets:.dot││├──hello_sets:.html││└──nodes││├──node180.html││├──node181.html ││├──node182.html││├──node183.html││├──node185.html││├──node186.html││ ├──node187.html││├──node188.html││├──node189.html││├──node190.html││ ├──node191.html││├──node192.html││├──node193.html││├──node194.html││├──n ode195.html││├──node196.html││├──node197.html││├──node198.html││├──node199 . html││├──node200.html││├──node201.html││├──node202.html││├──node203.html││├──node204. Html││├──node205.html││├──node206.html││├──node207.html││├──node208.html│ │├──node209.html││└──node210.html│├──hello.m.d2ac.html│├──viewcontroller.m.d2ac││├ ──viewcontroller.m.cfg││├──viewcontroller.m.cg││├──viewcontroller.m.stats││├──viewcontroller.m.te Nv││├──viewcontroller_didreceivememorywarning.dot││├──viewcontroller_didreceivememorywarning.html││ ├──viewcontroller_viewdidload.dot││├──viewcontroller_viewdidload.html││└──nodes││├──node207.h Tml││├──node208.html││├──node209.html││├──node210.html││├──node211.html│ │└──node212.html│├──viewcontroller.m.d2ac.html│├──main.m.d2ac││├──main.m.cfg││├──main. M.cg││├──main.m.Stats││├──main.m.tenv││├──main{a662}.dot││├──main{a662}.html││└──nodes││├──nod
E207.html││├──node208.html││└──node210.html│└──main.m.d2ac.html├──log│├──analyzer_err │└──analyzer_out├──multicore│├──makefile│├──cl1│├──cl2│├──cl3│├──cl4│├──xcl1.cluster│ ├──xcl2.cluster│├──xcl3.cluster│└──xcl4.cluster├──procs.csv├──report.csv├──report.json├──sources│ ├──appdelegate.m.d2ac│├──hello.m.d2ac│├──viewcontroller.m.d2ac│└──main.m.d2ac├──specs│├──appdelega te_application:didfinishlaunchingwithoptions:.specs│├──appdelegate_applicationdidbecomeactive:.specs│├── appdelegate_applicationdidenterbackground:.specs│├──appdelegate_applicationwillenterforeground:.specs│├── Appdelegate_applicationwillresignactive:.specs│├──appdelegate_applicationwillterminate:.specs│├──appdelegate_ Memory_leak_bug.specs│├──appdelegate_Npe_in_array_literal_bug.specs│├──appdelegate_parameter_not_null_checked_block_bug:.specs│├──appdelegate_ Premature_nil_termination_argument_bug.specs│├──appdelegate_resource_leak_bug.specs│├──appdelegate_setwindow:. Specs│├──appdelegate_window.specs│├──hello_hello.specs│├──hello_ivar_not_nullable_bug:.specs│├──hello_ Null_dereference_bug.specs│├──hello_parameter_not_null_checked_bug:.specs│├──hello_return_hello.specs│├──he Llo_s.specs│├──hello_sethello:.specs│├──hello_sets:.specs│├──viewcontroller_didreceivememorywarning.specs│
├──viewcontroller_viewdidload.specs│└──main{a662}.specs├──stats.json└──timing.dot
Let's go to the captured/directory to open an HTML file, as follows:
And each method later has a mirrored connection, the point entry can see more detailed information. Summary
The result file generated in debug mode is more detailed and has HTML format and is easy to read, it is recommended to turn on debug mode. But hopefully Facebook will have a more detailed introductory document, otherwise it's hard to understand.