Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Skipping debugging of certain DLLs when attaching with VS?

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

    Skipping debugging of certain DLLs when attaching with VS?

    Hello,

    I read in chat gpt that there is a way to exclude certain DLLs from being debugged in VS 2022 - doing something like a startup file to mention / list all files which should not be debugged when attaching VS debugger to NinjaTrader (else it would crash ninjatrader). Do you have a step by step guide on how to accomplish it?

    For example, I have 3rd party DLL with debugger protection, and I don't want VS to step into that file since I really want to debug my own source code - but NT8 crashes right away when trying to attach debugger. Any suggestions step by step on how to accomplish it?

    This sample is more related to VSCode than Visual Studio...
    VisualStudio should have files with .navstepfilter placed either into solution or into "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Packages\Debugger\Vi sualizers"

    example for navstepfilter for vs 2022 C# to avoid debugging dll
    Visual Studio 2022 offers step filtering for C# debugging to avoid stepping into unwanted DLLs. While the
    .natstepfilter file is primarily for C++, you can achieve similar results in C# by leveraging the launch.json file and its skipFiles property.
    Using launch.json and skipFiles for C#:
    The launch.json file allows you to customize your debug configuration, including specifying which files or patterns to skip while debugging.
    Example launch.json:
    Here's an example of a launch.json file demonstrating how to use the skipFiles setting to avoid debugging a specific DLL:
    json{
    "version": "0.2.0",
    "configurations": [
    {
    "name": "My C# App", // Replace with your application's name
    "type": "dotnet",
    "request": "launch",
    "project": "${workspaceFolder}/YourApp.csproj", // Replace with your project file
    "skipFiles": [
    "${workspaceFolder}/path/to/your/dll/**/*.cs" // Replace with the actual path to your DLL
    ]
    }
    ]
    }

    Use code with caution.

    Explanation:
    • skipFiles: This property accepts an array of strings that specify the files or patterns to skip during debugging.
    • ${workspaceFolder}/path/to/your/dll/**/*.cs: This is a glob pattern that tells the debugger to skip all C# files (.cs) within the specified path to your DLL.
    How to Use:
    1. Locate or Create launch.json: If you don't have a .vscode folder with a launch.json file in your project, you can create one.
    2. Add a Debug Configuration: Add or modify a debug configuration for your C# application within the launch.json file.
    3. Specify the DLL path in skipFiles: Configure the skipFiles setting with the correct path to the DLL that you want to avoid debugging.
    4. Start Debugging: Launch your application with the debugger attached.
    By configuring the skipFiles property in your launch.json file, you can effectively skip the debugging of specific DLLs and focus on debugging your code.​


    Thank you
    Last edited by music_p13; 07-06-2025, 09:16 PM.

    #2
    Hello music_p13,

    Please note the sticky at the top of this archived forum landing page.

    We have moved! The legacy forum is now in view‑only mode and existing posts will remain accessible for reference, but no new threads or replies can be added. Join the conversation on our new NinjaTrader Community Forums and read our frequently asked questions to learn more.


    If you would like this inquiry to be to the NinjaTrader community, please join our new discourse forum and create a new post.
    This forum provides an outlet for our user community to interact with our technical support team and fellow traders. For additional interactive training resources, be sure to check out our Free Daily Webinars and Video Library.


    If you would like assistance from the NinjaScript Engineering Support team, please send an email to scriptingsupport [at] ninjatrader.com.


    As a heads up, our team would not be able to assist with configuring visual studio.​
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    542 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    321 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    97 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    539 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    545 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X