Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help Needed with NinjaTrader Indicator Debugging in Visual Studio

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

    Help Needed with NinjaTrader Indicator Debugging in Visual Studio

    I have opened the NinjaTrader indicator script in Visual Studio and selected the debug mode. I attached the process in Visual Studio to NinjaTrader and added breakpoints in the code. However, the breakpoints are always in disabled mode.

    Could anyone please help me with this issue?
    Click image for larger version

Name:	image.png
Views:	247
Size:	97.1 KB
ID:	1277303

    Click image for larger version

Name:	image.png
Views:	245
Size:	291.5 KB
ID:	1277302

    #2
    Hello ramanji,

    Thank you for your post.

    Please carefully review the steps to properly attach the debugger:
    https://ninjatrader.com/support/help..._debugging.htm

    Make sure you are entering debug mode in the NS Editor before hitting compile. Here is also a video demonstrating:
    https://drive.google.com/file/d/17C-...XiOugizM0/view

    If you are getting an error along the lines of "… the current source code is different from the version built into...", you will need to allow source code to be different for your breakpoint(s).
    • To modify a single breakpoint, hover over the breakpoint icon in the editor and select the settings (gear) icon. A peek window is added to the editor. At the top of the peek window, there's a hyperlink that indicates the location of the breakpoint. Select the hyperlink to allow modification of the breakpoint location and check Allow the source code to be different from the original.
    • To modify this setting for all breakpoints, go to Debug > Options and Settings. On the Debugging/General page, clear the Require source files that exactly match the original version option. Make sure to reenable this option when you're finished debugging.

    Please let me know if I can assist further.

    Comment


      #3
      Hi Gaby,

      Thanks for your response. I followed the steps as you described in the video, but unfortunately, it's not working from my end. Breakpoints are always in disabled mode, so I am unable to debug. Please find the screenshot. Can you please help me with this?



      Click image for larger version

Name:	image.png
Views:	227
Size:	227.3 KB
ID:	1278014

      Comment


        #4
        Hello,

        Can you please send a screenshot of the Tools > Options > Debugging > General window to confirm the setting to allow source code to be different for your breakpoint(s)?

        Comment


          #5
          ​Hi Gaby,

          After clearing this option "the Require source files that exactly match the original version option.", it's working fine

          Thank you very much for your support.



          Click image for larger version

Name:	image.png
Views:	211
Size:	158.6 KB
ID:	1278245

          Comment


            #6
            Hi Gaby,
            Thanks for the work around solution. I have this similar problem (with or without OneDrive), while testing with the standard NT8 SMA function. This problem did not occur until I updated to ver. 8.1.2.0. The latest ver. 8.1.2.1, just installed today, did not resolve this problem either.

            VS2022(ver.17.4.5) also display a message of incorrect configuration mappings. Could there be a problem with configuration mappings on the NinjaTrader.Custom file?​
            Attached Files

            Comment


              #7
              Hello,

              This is a Visual Studio error and unrelated to NinjaTrader.

              While we cannot provide support for Visual Studio, you could try uninstalling and reinstalling to see if it resolves the error. Past users have also reported that doing a clean user folder to regenerate .csproj and delete any extra files created by Visual Studio worked for them.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              602 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              347 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              103 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              559 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              558 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X