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

Error message line without being in debug mode

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

    Error message line without being in debug mode

    Hi, i have an extension method that shows me the line number of the error in VS2019, this also works without problems, but unfortunately only in debug mode. is it possible to get this also in non debug mode? if i copy the *.pdb file needed for this into the custom folder, it is deleted after nt compiles and only 0 is displayed again.

    Debug Mode:
    Code:
    19.03.2021 11:46:34:000 [SidiSystemBase]-[ID=227614025]-[Void OnBarUpdate()]-[[B][COLOR=#c0392b]Line=2528]-[Column=17]-[FileName=c:\Users\***\***\Dokumente\NinjaTrader 8\bin\Custom\Strategies\SidiSystemBase.cs][/COLOR][/B]-[LogLevel=Error]
    non Debug Mode:
    Code:
    19.03.2021 11:46:34:000 [SidiSystemBase]-[ID=227614025]-[Void OnBarUpdate()]-[COLOR=#c0392b][B][Line=0]-[Column=0]-[FileName=][/B][/COLOR]-[LogLevel=Error]
    sidlercom80
    NinjaTrader Ecosystem Vendor - Sidi Trading

    #2
    Hello sidlercom80,

    From the given details it sounds like you are using some C# debug mode properties to print the line number. Without more details on what specific C# property or methods you are using I would guess that what you are seeing is correct and relies on debug mode being enabled.

    You can do a test to see if this relates to C# debug/release, you could make an external C# application in visual studio and try this code in that context. If placing the code in release mode prevents it from working that would be your answer. NinjaTrader's debug mode is simply leveraging the C# compiler options to enable debug/release modes on the visual studio project that is being used. The debug symbols and other debug data would be removed when debug mode is not enabled to make sure no residual files are left so that is also expected.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rajendrasubedi2023, Today, 09:50 AM
    0 responses
    10 views
    0 likes
    Last Post rajendrasubedi2023  
    Started by ender_wiggum, Today, 09:50 AM
    0 responses
    4 views
    0 likes
    Last Post ender_wiggum  
    Started by bmartz, Today, 09:30 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by geddyisodin, Today, 05:20 AM
    3 responses
    24 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by lorem, Today, 09:18 AM
    1 response
    5 views
    0 likes
    Last Post lorem
    by lorem
     
    Working...
    X