Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Debugging issues, a new user of NT8

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

    Debugging issues, a new user of NT8

    Hi, all

    I got some issues while debugging with NT8 by using VS2022..does anyone can help?

    Here are my progress (I would like to debug for the temple strategy: SimpleMACrossOver

    Step 1: Open NinjaScript, open 'SimpleMACrossOver', click debug mode.

    Step 2: Open VS2022, and find SimpleMACrossOver, open it as well, adding breakpoints

    Step 3: On NinjaScript, click compile

    Step 4: On VS2022, attach the process to 'NinjaTrade.exe​'

    Step 5: Run backtest for SimpleMACrossOver on Ninjatrade station

    As a result, the program on VS2022 is running, but never touch any breakpoint...I have no idea where is the mistake, any suggestion?

    PS: I noticed that the XAML hot reload is unavialble on ninjatrader platform, however, I should enable it on VS already.

    Click image for larger version  Name:	image.png Views:	0 Size:	225.2 KB ID:	1308937
    Last edited by arthur0712; 06-28-2024, 01:27 AM.

    #2
    Hello arthur0712,

    The breakpoints are not hit because they are not solid red, that means its not seeing the updated source code so it won't reach those points. In the NinjaScript editor you need to make sure debug mode is checked and then do a compile after checking it. In visual studio you need to hover the mouse over the breakpoint and see what message it shows, if it says something about needing to allow source code to be different 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.

    Comment


      #3
      Thanks Jesse, it works!

      Last edited by arthur0712; 06-28-2024, 08:23 AM.

      Comment


        #4
        Hello arthur0712,

        From your image the enabled checkbox will be the next property in the setup section, you just need to scroll down in that window or expand the window some so you can see it.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        64 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        41 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        22 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        25 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        51 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X