Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xmake-io/xmake-vscode
๐ฉ A XMake integration in Visual Studio Code
https://github.com/xmake-io/xmake-vscode
editor-plugin lua plugin visual-studio vscode xmake xmake-vscode
Last synced: 1 day ago
JSON representation
๐ฉ A XMake integration in Visual Studio Code
- Host: GitHub
- URL: https://github.com/xmake-io/xmake-vscode
- Owner: xmake-io
- License: apache-2.0
- Created: 2017-09-30T16:54:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-26T12:58:04.000Z (3 months ago)
- Last Synced: 2024-08-02T07:12:55.955Z (3 months ago)
- Topics: editor-plugin, lua, plugin, visual-studio, vscode, xmake, xmake-vscode
- Language: TypeScript
- Homepage: https://xmake.io
- Size: 8.78 MB
- Stars: 225
- Watchers: 11
- Forks: 55
- Open Issues: 46
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-xmake - xmake-vscode
README
## Introduction
A XMake integration in Visual Studio Code.
You need install [xmake](https://github.com/xmake-io/xmake) first and a project with `xmake.lua`.
Please see [xmake-github](https://github.com/xmake-io/xmake) and [website](http://xmake.io) if you want to known more about xmake.
## Features
* Quickstart
* Colorization
* Completion Lists
* StatusBar
* Commands
* Configuration
* Build
* Run and Debug
* Record and Playback
* Problem## Quickstart
## Colorization and Completion Lists
## StatusBar
![statusbar](https://raw.githubusercontent.com/tboox/xmake-vscode/master/res/statusbar.png)
## Commands
## Configuration
## Build
## Run and Debug
## Record and Playback
## Problem
## IntelliSense
xmake-vscode will generate `.vscode/compile_commands.json` file, so you need only add it to `.vscode/c_cpp_properties.json` to enable IntelliSense.
for example (`.vscode/c_cpp_properties.json`):
```json
{
"configurations": [
{
"compileCommands": ".vscode/compile_commands.json"
}
],
"version": 4
}
```### How can I generate c_cpp_properties.json?
These configuration settings are stored in your project's c_cpp_properties.json file. To edit this file, in VS Code, select C/C++: Edit Configurations (UI) from the Command Palette (โงโP):
Please see [IntelliSense for cross-compiling](https://code.visualstudio.com/docs/cpp/configure-intellisense-crosscompilation)
![](https://code.visualstudio.com/assets/docs/cpp/cpp/command-palette.png)
## Debugging
Debug via launch configurations (launch.json) is accessible only with Run->Start Debugging (not F5 keybinding) or via Launch Debug command.
|attribute |type | |
|-------------------|------|---------|
|**name** |string| *Required.* Launch configuration name, as you want it to appear in the Run and Debug panel.
|**type** |string| *Required.* Set to `xmake`.
|**request** |string| *Required.* Session initiation method:`launch` or `attach`.
|**target** |string| *Required.* XMake target.
|env |object| Additional environment variables. `{"PATH" : "some/path"}`
|args |string โ [string]| Command line parameters. If not defined args are taken from `debuggingTargetsArguments` config.
|cwd |string| If not defined xmake will use the target directory.
|stopAtEntry |boolean| If set to true, the debugger should stop at the entry-point of the target (ignored on attach). Default value is false.
|terminal |string| Destination of stdio streams:
- `console` for Debug Console
- `integrated` (default) for VSCode integrated terminal
- `external` for a new terminal window
- `newExternal` for a new terminal window but only with cli application (only cpptools / with lldb it will be converted to `external`)
Example:
```json
{
"configurations": [
{
"name": "XMake Debug",
"type": "xmake",
"request": "launch",
"target": "example",
"stopAtEntry": true
}
]
}
```
### Configurations related to debugging
#### Debugger extension
You can choose the debugger extension with `xmake.debugConfigType`, set it to:
* `default` for cpptools debugger
* `codelldb` for lldb debugger
#### Envs behaviour
You can choose the behaviour between xmake envs and envs that are defined in `launch.json`
For an xmake envs that are like this `{"PATH: "path/from/xmake"}` and in `launch.json`
`{"PATH": "path/from/config"}`.
Default is `merge`.
* With `xmake.envBehaviour` set to `merge`, the result is: `{"PATH": "path/from/xmake;path/from/config"}`.
* With `xmake.envBehaviour` set to `erase`, the result is: `{"PATH": "path/from/xmake"}`
* And with `xmake.envBehaviour` set to `override`, the result is: `{"PATH": "path/from/config"}`.
XMake envs will only be replaced for the same key, if another xmake env key is present, it will be present in the final result.
## Global Configuration
We can configure them in settings.json
```json
{
"configuration": {
"type": "object",
"title": "XMake configuration",
"properties": {
"xmake.executable": {
"type": "string",
"default": "xmake",
"description": "The xmake executable name / path"
},
"xmake.logLevel": {
"type": "string",
"default": "normal",
"description": "The Log Level: normal/verbose/minimal",
"enum": [
"verbose",
"normal",
"minimal"
]
},
"xmake.buildLevel": {
"type": "string",
"default": "normal",
"description": "The Build Output Level: normal/verbose/warning/debug",
"enum": [
"verbose",
"normal",
"warning",
"debug"
]
},
"xmake.buildDirectory": {
"type": "string",
"default": "${workspaceRoot}/build",
"description": "The Build Output Directory"
},
"xmake.installDirectory": {
"type": "string",
"default": "",
"description": "The Install Output Directory"
},
"xmake.packageDirectory": {
"type": "string",
"default": "",
"description": "The Package Output Directory"
},
"xmake.workingDirectory": {
"type": "string",
"default": "${workspaceRoot}",
"description": "The Project Working Directory with the root xmake.lua"
},
"xmake.androidNDKDirectory": {
"type": "string",
"default": "",
"description": "The Android NDK Directory"
}
}
}
}
```