이 제출물을 팔로우합니다
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다
MATLAB Coder Interface for Visual Studio Code Debugging
The MATLAB® Coder™ Interface for Visual Studio® Code™ Debugging support package allows you to use Visual Studio Code to view and debug C and C++ code. For example, code that you generate from MATLAB code and Simulink® models or code that you import from external libraries.
How to Install
You will need to install an extension in Visual Studio Code, by following the steps below:
- Download and install support package
- Open Visual Studio Code and navigate to the Extensions pane
- In the top right corner of the pane select "..." and "Install from VSIX..."
- Retrieve path of support package installation: matlabshared.supportpkg.getSupportPackageRoot()
- Navigate to the support package installation folder (from step 4) and select the VSIX file in "toolbox > targetframework > supportpackage > vscodedebug > extension > matlab-coder-interface-vscode-debugging.vsix"
Alternatively, if the code command is on your system path, you can install the extension by running this command in the MATLAB Command Window:
system("code --install-extension " + fullfile(matlabshared.supportpkg.getSupportPackageRoot(), "toolbox", "targetframework", "supportpackage", "vscodedebug", "extension", "matlab-coder-interface-vscode-debugging.vsix"))
Supported Workflows
The following workflows are supported with Visual Studio Code:
- Debug Generated Code During SIL Simulation (Simulink Coder™ and Embedded Coder®)
- Debug Generated Code During SIL Execution (MATLAB Coder)
- From R2022b, Debug Custom C/C++ Code (Simulink) using Simulate custom code in a separate process
How to Uninstall
To disable Visual Studio Code as debugger for the workflows listed above, uninstall this support package.
Requirements
General
- Visual Studio Code version 1.59.0 or above
- Visual Studio Code command line (see documentation)
- C/C++ extension by Microsoft®
Linux®
- For SIL debugging, MATLAB must be started from a terminal running a bash shell.
Mac®
- Xcode® or Command Line Tools are in default locations (/Applications/Xcode.app or /Library/Developer/CommandLineTools).
Windows®
- For SIL debugging, MinGW® must be installed using instructions from MATLAB Support for MinGW-w64 C/C++ Compiler. To configure the path to the newer GDB version, run the command: target.mingw.OverrideDebuggerPathForMinGWGDB.set(pathToGDB)
Compilers and Debuggers
- macOS®: Xcode & LLDB
- Linux: GCC & GDB
- Windows: MinGW GCC & MinGW GDB
Support
If you have download or installation problems, please contact Technical Support - www.mathworks.com/contact_ts
MATLAB 릴리스 호환 정보
- R2022a에서 R2026a까지의 릴리스와 호환
플랫폼 호환성
- Windows
- macOS (Apple Silicon)
- macOS (Intel)
- Linux
