1
gen_server 모듈을 디버깅 할 때 자세한 상태를 기록하고 싶습니다.전 처리기, ifdef
init()->
put(?COMPLETED_COMMANDS,[]),
-ifdef(DEBUG).
put(?DETAIL_STATUS,[]),
-endif.
ok.
컴파일러에서 다음 오류가 발생합니다.
src/benvolio_command_cache.erl:34: syntax error before: ','
src/benvolio_command_cache.erl:36: syntax error before: '.'
src/benvolio_command_cache.erl:33: variable 'DEBUG' is unbound
src/benvolio_command_cache.erl:33: function ifdef/1 undefined
*.erl
파일의 기능에 디버깅 코드 줄을 추가하는 방법은 무엇입니까?