• CAMAPI
  • API Documentation
Show / Hide Table of Contents
  • Supported programming languages
    • C#
    • Delphi
    • C++
  • Tutorial lessons
    • Lesson 1 - general introduction to the extension ideology using the example of a C# project
    • Lesson 2 - connecting the SDK to a Delphi project using the build system
    • Lesson 3 - connecting the SDK to a C++ project using the build system
    • Lesson 4 - demonstration of methods for unloading an extension during main application is running
    • Lesson 5 - Creating a custom operation
    • Lesson 6 - Creating a C# application to interact with geometry in main application
    • Lesson 7 - Creating a C# application to connect to main application for managing it
  • System extensions
    • Extension.Util.Common.Dll
    • Extension.Util.Common.Exe
  • Debugging of extensions
    • Debugging a .NET extension using Visual Studio Code
    • Debugging a Delphi extension using RAD Studio
    • Debugging a C++ extension using Visual Studio
  • Entry points
    • Utilitiy in main form
    • Executor for utility in main form
    • New item to the operation's context menu
  • Machining Tools Import
    • Preparing the environment
    • Working with the tool library
    • Working with cutting tools
      • Milling Tools
      • Turning Tools
      • Custom Axial Shaped Tools
    • Working with the tool holder
  • API Documentation
  • External applications
    • Connecting in a C# application
    • Connecting in a Delphi application
    • Connecting in a C++ application

Debugging a .NET extension using Visual Studio Code

Debugging in Visual Studio Code is configured using launch.json, where the executable program and its launch parameters are specified. This launch.json is already present in the examples from our GitVerse repository:

  • program: "C:/Program Files/Sprut Technology/SprutCAM 18/Bin64/sc.exe";
  • args: ["/EXTENSION_DEBUG_FOLDER="${workspaceFolder}/project/main/bin/Debug""].

This means that selecting Run -> Start Debugging will lead to:

  • Visual Studio Code executes preLaunchTask:
    • Compiles your project, placing the DLL in the path specified in the .csproj file (<OutDir>bin\$(Configuration)\</OutDir>);
    • Copies settings.json to the same folder;
  • C:/Program Files/Sprut Technology/SprutCAM 18/Bin64/sc.exe is launched with the parameter /EXTENSION_DEBUG_FOLDER="${workspaceFolder}/project/main/bin/Debug";
  • SprutCAM, in addition to the extensions already registered, analyzes the directory ${workspaceFolder}/project/main/bin/Debug, loading just compiled dll file according to the settings.json file;
  • Your breakpoints in Visual Studio Code will be hit as your extension is used in the SprutCAM application.
In this article
Back to top Generated by DocFX