Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Debug mode question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Debug mode question

    Do I have any control over what happens during a Debug Mode build, such as being able to define preprocessor symbols? Will Debug Mode builds automatically define some preprocessor symbol denoting that it is a debug build?

    The most important question is how to conditionally compile debugging code in my indicator.

    =====

    A related question -- is there any way with NT8 to do the equivalent of defining symbols in the Visual Studio project? The goal is to be able to define a small number of #defines in one place and have all of my indicators see those definitions. C# has no native way to handle that, so it is up to the build environment.

    --EV
    Last edited by ETFVoyageur; 08-04-2015, 12:44 AM.

    #2
    No, you cannot define your own preprocessor symbols for the debug build as the Custom project is not used to actually build the Custom.DLL when you compile NinjaScript.

    With that said, the DEBUG symbol is defined when you have generated a debug build, so the following would work

    Code:
    #if DEBUG
    	Print("Debug");
    #endif
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    136 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    293 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    238 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    334 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    171 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X