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

Debugging problem with version 8.1.2

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

    Debugging problem with version 8.1.2

    In general, a strange situation. With version 8.0.28, everything is OK. Debugging works. With version 2.1.* everything is bad. The symbols are loaded, but the breakpoint does not work. I don't know what to do anymore, I just have to ask here.
    P.S. VS2022 Pro, Win 10Pro, LTSC
    Attached Files
    Last edited by alexr; 11-06-2023, 12:32 PM.

    #2
    Hello alexr,

    You could hover your mouse over the breakpoint and follow the instructions in the breakpoint message seen below.

    "To allow this breakpoint to be hit: click the 'Settings...' button that appears, then click 'Location', 'Allow the source code to be different from the original'.

    After following those instructions the breakpoint will be hit.

    After clicking the Settings button in that hover dialog the Location it mentions is the blue link at the top of the options. You can then check the box to allow the breakpoint and it will turn red/be hit. ​It will produce a warning the first time its hit and you can select yes to allow the breakpoint to be hit. After that it can be hit multiple times without warning.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello Jesse,

      I got this:
      Attached Files

      Comment


        #4
        Hello alexr,

        Correct that is what I had described in my post, you click Yes and it will allow you to hit the breakpoint.
        JesseNinjaTrader Customer Service

        Comment


          #5
          When I clicked Yes it worked. But in my working code, and it works correctly in 8.0.28 and in compiled builds in 8.1.*, the exception is thrown elsewhere.

          Comment


            #6
            Hello alexr,

            I am not sure I understand what you are saying, can you try to rephrase the statement or question?
            JesseNinjaTrader Customer Service

            Comment


              #7
              Well, I have AddOn. In version 8.0.28, debugging occurs without problems. The compiled library works without problems in versions 8.1.*. But when I do this trick(you said above) with a breakpoint in 8.1.*, I get an exception where it shouldn't be.

              Comment


                #8
                The question here is more about why debugging stopped working out of the box altogether.

                Comment


                  #9
                  Hello alexr,

                  Did you make sure to compile after making changes and before attaching the debugger? If you are seeing a problem with how the debugging is working do you have a specific example that you can provide?
                  JesseNinjaTrader Customer Service

                  Comment


                    #10
                    Of course, this is the latest compiled assembly. I noticed the following thing, after cleaning the Tmp folder and after compilation, another copy of the dll compiled a day earlier appeared, but it doesn't seem to be added to the debugger. It does not match the content of the last copied file, and is almost identical to NinjaTrader.Custom.dll. No changes were made to the source code.
                    All this looks very strange.​

                    For now, I disable the source code check while working, but it is not very convenient.
                    Attached Files

                    Comment


                      #11
                      Hello alexr,

                      You should not manually remove any of the tmp files that NinjaTrader creates manually. Please allow the platform to compile and regenerate/remove files by its self. If you are manually modifying files that can cause issues with how the platform works.

                      JesseNinjaTrader Customer Service

                      Comment


                        #12
                        I have the same problem on each updated PC.

                        Comment


                          #13
                          I have exactly the same problem.
                          fx.practic
                          NinjaTrader Ecosystem Vendor - fx.practic

                          Comment


                            #14
                            Hello frslvr and fx.practic,

                            The steps to allow breakpoints to be hit is listed in post number 2. If you mouse over a breakpoint it also lists the instructions to allow for breakpoints to be hit, that is the second image in post 1. You can enable that for individual breakpoints or you can also change the settings in visual studios configuration to always allow breakpoints. To get to the dialog shown in the image you can hover the mouse over a breakpoint.
                            JesseNinjaTrader Customer Service

                            Comment


                              #15
                              alexr, please, explain how did you do this: "I disable the source code check while working"?

                              I found this instruction: https://learn.microsoft.com/en-us/vi...s?view=vs-2022
                              Is this what you did?
                              fx.practic
                              NinjaTrader Ecosystem Vendor - fx.practic

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Karado58, 11-26-2012, 02:57 PM
                              8 responses
                              14,825 views
                              0 likes
                              Last Post Option Whisperer  
                              Started by Option Whisperer, Today, 09:05 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post Option Whisperer  
                              Started by cre8able, Yesterday, 01:16 PM
                              3 responses
                              11 views
                              0 likes
                              Last Post cre8able  
                              Started by Harry, 05-02-2018, 01:54 PM
                              10 responses
                              3,203 views
                              0 likes
                              Last Post tharton3  
                              Started by ChartTourist, Today, 08:22 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post ChartTourist  
                              Working...
                              X