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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        161 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        311 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        245 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        350 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X