Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Visual Studio : Saving in VS no longer allows breakpoints to be hit

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

    Visual Studio : Saving in VS no longer allows breakpoints to be hit

    I am running into this issue on the release version.

    Replication Steps
    - In Ninja Script Editor Run Compile
    - In Ninja Script Editor Run Open Visual Studio
    - In Visual Studio Attach to the Ninja Process
    - In Visual Studio Attach Breakpoints
    - See warning saying that the source code has changed and the break point could not be attached.

    I have verified that I only have one workspace open. I have also verified that hot reload for C++ is enabled.

    This workspace is set to "Debug". This is not new code, and things were working fine pre-update.

    Ninjatrader 8.1.3.0 64-bit

    Microsoft Visual Studio Community 2022 (64-bit) Version 17.9.6​


    #2
    There is a visual studio debugging option "Require source files to match..." which can be disabled as a workaround.

    Comment


      #3
      Hello nicthe,

      This error can appear with breakpoints in Visual Studio when attaching the debugging if your source file has changed and the source no longer matches the code you're debugging.

      During compilation, the open source code is compiled into NinjaTrader’s assembly source. The code that runs within NinjaTrader coming from the internal source is different than the open source script you are editing which is kept separate and exposed.

      To resolve, follow one of the options to disable these safety checks:
      • 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.

      These instructions come from the Microsoft documentation on Troubleshooting Breakpoints in the Visual Studio Debugger:

      Microsoft documentation: Learn > Troubleshoot > Visual Studio > Troubleshoot breakpoints in the debugger
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      85 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      47 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      29 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      67 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X