This extension adds a command to Visual Studio Code that allows you to compile and run C++ and Python files with a single click.
Features
Compile C++ files using the g++ compiler and run the resulting executable.
Run Python files using the python interpreter.
Supports both Windows and Unix-based systems (macOS, Linux).
Displays compilation and execution output in the Visual Studio Code terminal.
Requirements
For C++:
g++ compiler installed and available in the system's PATH.
For Python:
Python interpreter installed and available in the system's PATH.
Usage
Open a C++ (.cpp) or Python (.py) file in Visual Studio Code.
Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS) to open the command palette.
Search for Compile and Run and select the command.
The extension will automatically detect the file type and perform the appropriate action:
For C++ files, it will compile the file using g++ and run the resulting executable.
For Python files, it will run the file using the python interpreter.
The output from the compilation or execution will be displayed in the Visual Studio Code terminal.
Extension Settings
This extension does not currently have any configurable settings.
Known Issues
The extension assumes that the g++ compiler and python interpreter are available in the system's PATH. If they are not, you may need to configure the PATH or modify the extension code to specify the correct paths.
Release Notes
1.0.0
Initial release of the Compile and Run extension.
Contributing
If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository.