Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Establishing a breakpoint on bartypes.cs using Visual Studio

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

    Establishing a breakpoint on bartypes.cs using Visual Studio

    I'm trying to establish a breakpoint using Visual Studio on the bartypes.cs code so I can understand how that code is being processed.

    I can put a breakpoint in my indicator (e.g. mySMA), but for some reason the breakpoint within bartypes.cs for the range bars (for example on a range bars chart) will not be triggered. It's like that code / breakpoint in BarTypes.cs is totally ignored by VS.

    Does someone know how do I establish a breakpoint on bartypes.cs? (btw, of course, i'm compiling with Debug mode on, otherwise, mySMA wouldn't stop at breakpoint also).

    Thanks!

    #2
    Hello ds1111,

    That may be expected as the "@BarsType.cs" would be cached then called. I believe it should be inside of the NinjaTrader.Custom.dll file, but I have not been able to find this.

    Let me look around a bit and I will get back with you.
    JCNinjaTrader Customer Service

    Comment


      #3
      I attached an image of my Visual Studio window with my breakpoints...

      Maybe someone has an idea how to solve this... I've been stuck in a piece of code for a week now, and I think debugging this really would help me.

      Any hints?
      Attached Files

      Comment


        #4
        Guys...

        Not to be impatient, but this is very important to me... any help here? thanks!

        Comment


          #5
          Hello ds1111,

          After looking into this a bit farther and talking with some colleagues, it appears that the debug mode is not going to be able to retrieve the BarsType.cs file and attach it to the process inside of Visual Studios to hit any break points. This is most likely due to the fact that custom bar types are not supported inside of NinjaTrader.

          We are going to be looking into this for NT8 but not available through NT7.

          Happy to be of further assistance.
          JCNinjaTrader Customer Service

          Comment


            #6
            Please, can you find out what is the technical issue preventing this?

            I may be able to come up with a workaround if I understand what is the issue.

            Also, for anybody in the community, can someone shed some light into this issue?

            Thanks!

            Comment


              #7
              Hello ds1111,

              Enabling the "Debug mode" generates ".pdb" files which are used in VS to attach the process to and debug the code at the break points. The "@BarsType.cs" I do not believe is going to be included when the compiler generates the ".pdb" files so you would not be able to see the attached break point via VS.

              Happy to be of further assistance.
              JCNinjaTrader Customer Service

              Comment


                #8
                Great... many thanks... this will give me some pointers for further investigation.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by CarlTrading, 03-31-2026, 09:41 PM
                1 response
                149 views
                1 like
                Last Post NinjaTrader_ChelseaB  
                Started by CarlTrading, 04-01-2026, 02:41 AM
                0 responses
                84 views
                1 like
                Last Post CarlTrading  
                Started by CaptainJack, 03-31-2026, 11:44 PM
                0 responses
                129 views
                2 likes
                Last Post CaptainJack  
                Started by CarlTrading, 03-30-2026, 11:51 AM
                0 responses
                125 views
                1 like
                Last Post CarlTrading  
                Started by CarlTrading, 03-30-2026, 11:48 AM
                0 responses
                102 views
                0 likes
                Last Post CarlTrading  
                Working...
                X