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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    666 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    377 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    110 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    575 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    580 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X