Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Debug in VS

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

    Debug in VS

    Hi,
    I'm having trouble debugging from my Visual Studio 2008.
    I did exactly as instructed on the guide.
    a) On NT Editor - enable "Debug Mode"
    b) On VS 2008 - "Attach To Process" - field set to "Managed Code"
    c) Set my breakpoint to line where - Print(High[0]);
    d) I then ran the strategy on a EUR/USD chart

    Nothing shows up on the locals window on VS. I even reload Ninjascript and reload all historical data on the chart. Nothing shows up on locals.

    The following is my strategy

    protectedoverridevoid Initialize()
    {
    AddPointAndFigure("$EURUSD", PeriodType.Tick, 1, 5, 3, PointAndFigurePriceType.HighsAndLows, MarketDataType.Last);
    }

    protectedoverridevoid OnBarUpdate()
    {
    if (BarsInProgress == 1)
    {
    Print(High[0]);
    Print(Low[0]);
    Print("The Day is: " + ToDay(Time[0]));
    Print("The Time is: " + ToTime(Time[0]));
    Print("");
    }
    }

    #2
    Hello,

    When you hit the break point does it stop inside of visual studio?

    -Brett
    BrettNinjaTrader Product Management

    Comment


      #3
      when i ran the strategy on the chart, the nt chart updated, otherwise nothing updates on vs.

      Comment


        #4
        Hello,

        This is an area we can't support in too much detail however it is my understanding that you would need to set a breakpoint for the code to break before you could get any updates in VS.

        -Brett
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        576 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X