Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unable to debug Strategies using visual studio

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

    Unable to debug Strategies using visual studio

    Hi,
    I'm trying to debug my strategies using Visual studio 2022 and for all strategies, Im'unable to set breakpoints, its says breakpoints unreachable (see pictures below)
    What I tried:
    - ensure that I compile in debug mode
    - Re-istall Visual studio 2022 and include .net4.8, 6, 7 and 8
    - reinstall Ninjatrader (without wiping everything as I have a big data db that I do not want to loose), I'm with version 8.1.2.1
    - tried to follow the VC advice to permit the souce difference without any change
    - tried to delete .sln file in custom, delete /bin and /obj without success

    - I see when I attach the process, when it worked, it open automatically the file that's already open in NT but not now
    - I see that if i change anything in VC (add space for example ) and hear the recompile sound in NT

    Any solution for this ?

    Thanks

    Click image for larger version

Name:	image.png
Views:	251
Size:	19.2 KB
ID:	1286597








    #2
    Hello bourasrafik,

    Thank you for your post.

    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

    Please let us know if you have any other questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    669 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    378 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    111 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    575 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    581 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X