You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Ryan Williams (JIRA)" <ji...@apache.org> on 2015/01/07 06:52:35 UTC

[jira] [Commented] (CB-5519) Should we add "DEBUG=1" to "Preprocessor Macros"->"Debug" ?

    [ https://issues.apache.org/jira/browse/CB-5519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14267306#comment-14267306 ] 

Ryan Williams commented on CB-5519:
-----------------------------------

The following 3 line sed command will inject the DEBUG=1 preprocessor macro into your xcode project file.
I recommend executing it immediately after "cordova platform add ios".
(Substitute MyProject for your projects name)

{noformat}
sed -i '' '/^[[:space:]]*GCC_OPTIMIZATION_LEVEL[[:space:]]*=[[:space:]]*0;/ a\
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";\
' platforms/ios/MyProject.xcodeproj/project.pbxproj
{noformat}

> Should we add "DEBUG=1" to "Preprocessor Macros"->"Debug" ?
> -----------------------------------------------------------
>
>                 Key: CB-5519
>                 URL: https://issues.apache.org/jira/browse/CB-5519
>             Project: Apache Cordova
>          Issue Type: Wish
>          Components: iOS
>    Affects Versions: 3.2.0
>            Reporter: glmnbeyond
>            Priority: Minor
>
> I created a helloCordova project via Cordova CLI, and added some debug info to native code:
> DLog('This is a debug info');
> But the debug info is never outputted.If I use  ALog, the info can be outputted, so I think it probably has something to do with the "DEBUG" macro.
> After I added "DEBUG=1" to "Preprocessor Macros", ran the helloCordova target, DLog can be outputted.
> So here is my question:
> Should we add "DEBUG=1" to iOS template project->"Build Settings"->"Preprocessor Macros"->"Debug" ?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org