VLISP Command — GstarCAD 2027
VLISP Command
GstarCAD 2027 · Command Reference
Commands > V Command > VLISP
Function Description:
This command is used to launch the Visual Studio Code as the Lisp debugger in GstarCAD 2023, in which you are able to edit, and debug Lisp programs conveniently.
Command Access:
Icon:
Menu: Tools > AutoLISP > Visual LISP Editor
Ribbon: Manage > Applications > Visual LISP Editor
Toolbar: /
Command: VLISP
Alias: VLIDE
Command Prompts: /
After excuting the command, GstarCAD checks whether Visual Studio Code (VS Code) has been installed.
- If VS Code is not installed, the following prompt box will be displayed.

- If VS Code has been installed, GstarCAD will automatically install the GstarLisp plug-in, as shown below. The plugin folder is stored in the %userprofile%\.vscode\extensions directory. When there is a new version of the GstarLisp plugin, it will be automatically updated the next time you start VS Code through GstarCAD.

Operation example:
Implements the debugging function of LISP programs through the VS Code editor and the GstarLisp plugin.
- Starts the command to open VS Code
- VS Code working interface

- GstarLisp plugin
Clicks Extensions>>GstarLisp, displays the detailed information of the GstarLisp plugin, as shown below.

- Opens a file
- Opens .lsp or .dcl files
Clicks GstarLisp>>Open Folder, selects the load directory , automatically filters out .lsp and .dcl files. Clicks the file in the list, and the editor on the right opens the file, as shown in the figure below.

- Edits .lsp or .dcl files
The GstarLisp plugin provides rich editing functions, such as syntax highlighting, intelligent input prompts, code auto-completion, code snippets, bracket matching, code folding, etc.
- Starts debugging
- Selects debug environment
To start debugging for the first time, you need to select the GstarLisp debugging environment. Open launch.json >> Add Configuration and add GstarLisp-Attach and GstarLisp-Launch to the launch.json file. - Selects debug mode
The GstarLisp plugin provides two debugging modes: Attach and Launch.
GstarLisp-Attach: Attaches a debug session to a running GstarCAD. (GstarCAD has been started, you can choose this mode)
GstarLisp-Launch: Start a new GstarCAD session by specifying the absolute path to the GstarCAD executable. (GstarCAD is not started, you can choose this mode)
After selecting the debug mode, click the Debug button on the activity bar >> Start Debugging.
- Debugging process
- VARIABLES
Locals: Displays the variable value of the executed code in the scope. The variable's value is displayed when the mouse hovers over the variable.
Last Value: Displays the most recently changed value of a variable or expression. - WATCH
Views and evaluates variables and expressions. - CALL STACK
A data structure that stores function call information during program execution. - BREAKPOINTS
Clicks the empty space to the left of the line number to set a breakpoint, clicks again to cancel the breakpoint. When the program execution reaches the line where the breakpoint is located, execution is interrupted. - Debug Console
Enters the variable or expression to be evaluated below the console, and the value of the variable or expression is returned. If the input variable does not exist, the input is returned. - Debug Commands
Play/Continue(F5): Jumps to the next breakpoint.
Step Over(F10): Executes the current line of code and skips to the next line.
Step In(F11): Steps into that line of code.
Step Out(Shift+F11): When single-stepping into a sub-function and stepping out, executes the unexecuted part of the function line.
Restart: Restarts debugging in the current GstarCAD process (GstarLisp-Attach mode), or terminates the current debugging session, and restart a new GstarCAD process for debugging (GstarLisp-Launch mode).
Stop/Disconnect: Stops the current debugging session.

