Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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:	79
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.
    Gaby V.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by geddyisodin, 04-25-2024, 05:20 AM
    8 responses
    61 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    4 responses
    3,288 views
    1 like
    Last Post jgualdronc  
    Started by Option Whisperer, Today, 09:55 AM
    0 responses
    5 views
    0 likes
    Last Post Option Whisperer  
    Started by halgo_boulder, 04-20-2024, 08:44 AM
    2 responses
    22 views
    0 likes
    Last Post halgo_boulder  
    Started by mishhh, 05-25-2010, 08:54 AM
    19 responses
    6,189 views
    0 likes
    Last Post rene69851  
    Working...
    X