Professional Documents
Culture Documents
SolidCAM + SOLIDWORKS
The Complete Integrated Manufacturing Solution
About this document
This documentation is designed to provide you with an overview of how to setup
SolidCAM Post-Processor debugger in Microsoft Visual Studio Code. There will be
also explanations on how to use specific features and improve the debugging of
post-processors code.
ii
SolidCAM + SOLIDWORKS = The Complete Integrated Manufacturing Solution
The Leaders in Integrated CAM
Table of Contents
Visual Studio Code Overview . . . . . . . . . . . . . . . . . . . . . . 1
Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
GPP Editor Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
GPP Language extension. . . . . . . . . . . . . . . . . . . . . . . . . . 9
iii
www.solidcam.com
Visual Studio Code Overview
Visual Studio Code (VS Code) is a lightweight but powerful free code editor with
support for development operations like debugging, version control and have
open-source API for various extensions (Plug-In) development of various tools.
SolidCAM Debugger consists of Visual Studio Code as a code editor and three
extensions within it:
• GPP Debugger (SolidCAM Extension for Debugger)
• GPP Editor Toolkit (Includes the Function list and editor tools for GPP language)
• GPP Language (Syntax highlighting for GPP files)
1
SolidCAM + SOLIDWORKS = The Complete Integrated Manufacturing Solution
Installation
The Leaders in Integrated CAM
3. Open VS Code, navigate to extension list and install downloaded extensions from
VSIX.
4. Restart VS Code. The extension list should look like the image below.
2
www.solidcam.com
Debugging
Getting Started
One of the key features of VS Code is its great debugging support. VS Code’s built-in
debugger helps accelerate your edit and debug loop of Post-Processors.
Debuggers can run in different modes and configurations, therefore the settings
for its behavior must be defined before using it. VS Code keeps debugging
configuration information in a launch.json file located in a .vscode folder in your
workspace (project root folder) or in your user settings or workspace settings.
1. To create a launch.json file, open your project folder in VS Code (File > Open
Folder). The folder can be located in your Post-Processor working directory or
anywhere else on your PC.
2. Select the Configure gear icon on the Debug view top bar.
3
SolidCAM + SOLIDWORKS = The Complete Integrated Manufacturing Solution
The Leaders in Integrated CAM
Here is the launch configuration launch.json file inside .vscide folder generated for
debugging.
3. Start SolidCAM and before G-code generation press a green triangle or F5 button
in VC Code. As soon as a debugging session starts, the DEBUG CONSOLE panel is
displayed and shows debugging output, and the Status Bar changes color (orange
for default color themes).
Debug actions
Once a debug session starts, the Debug toolbar will appear on the top of the
editor. The debug process is controlled through it.
4
www.solidcam.com
• Continue / Pause F5 (Run the G-code process until the breakpoint)
• Step Over F10 (Single-step mode with ignoring the call procedures)
• Step Into F11 (Single-step mode)
• Step Out Shift+F11 (going out of the calling procedure)
• Restart Ctrl+Shift+F5 (restart the Debugger)
• Stop Shift+F5 (stop the Debugger)
Breakpoints
Breakpoints can be toggled by clicking on the editor margin or using F9 on the
current line. Finer breakpoint control can be done in the Debug view’s BREAKPOINTS
section.
5
SolidCAM + SOLIDWORKS = The Complete Integrated Manufacturing Solution
The Leaders in Integrated CAM
There is also a possibility to define function breakpoint, which will be hit whenever
it matches the text search expression.
Note: The hit will happen only after the text matching.
Data inspection
Variables can be inspected in the VARIABLES section of the Debug view or by
hovering over their source in the editor. Variable values can be modified with
the Set Value action from the variable’s context menu. There are three groups of
variables filtered in each debugging procedure: Local user; Global user; Global
system.
6
www.solidcam.com
Variables can also be evaluated and watched in the Debug view’s WATCH section.
by doing a right-click in the WATCH section or right-click on the variable itself.
Procedure nesting can be analyzed in the Debug view’s CALL STACK section.
Note: In the CALL STACK section you may jump from one procedure to another and
analyze variables value changes in VARIABLES and WATCH sections.
7
SolidCAM + SOLIDWORKS = The Complete Integrated Manufacturing Solution
GPP Editor Toolkit
The Leaders in Integrated CAM
Procedure List allows you to jump to the selected procedure. Procedures can be
grouped by using ;#region region_name and ;#endregion in the .GPP code.
8
www.solidcam.com
GPP Language extension
You can download pre-defined settings.json file from from the link and customize
if necessary:
https://solidcam.box.com/s/l8vex20fzh7fu8eomvzgmxhvx80dmiri
Note: If any of the given links don’t work please don’t hesitate to contact SolidCAM
Support Team.
9
SolidCAM + SOLIDWORKS = The Complete Integrated Manufacturing Solution
The Leaders in Integrated CAM
10
www.solidcam.com
SolidCAM Reference Guide
Post-Processor Debugger
the MILLTURN Edge
www.solidcam.com