2020 <a href="https://github.com/xmake-io/xmake-vscode/blob/master/LICENSE.md">
2121 <img src="https://img.shields.io/github/license/tboox/xmake-vscode.svg?colorB=f48041&style=flat-square" alt="license" />
2222 </a>
23- <a href="https://www.reddit.com/r/tboox /">
23+ <a href="https://www.reddit.com/r/xmake /">
2424 <img src="https://img.shields.io/badge/chat-on%20reddit-ff3f34.svg?style=flat-square" alt="Reddit" />
2525 </a>
26- <a href="https://gitter.im/tboox/tboox?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge ">
27- <img src="https://img.shields.io/gitter/room/tboox/tboox .svg?style=flat-square&colorB=96c312 " alt="Gitter " />
26+ <a href="https://discord.gg/xmake ">
27+ <img src="https://img.shields.io/badge/chat-on%20discord-7289da .svg?style=flat-square" alt="Discord " />
2828 </a>
2929 <a href="https://t.me/tbooxorg">
3030 <img src="https://img.shields.io/badge/chat-on%20telegram-blue.svg?style=flat-square" alt="Telegram" />
3131 </a>
3232 <a href="https://jq.qq.com/?_wv=1027&k=5hpwWFv">
3333 <img src="https://img.shields.io/badge/chat-on%20QQ-ff69b4.svg?style=flat-square" alt="QQ" />
3434 </a>
35- <a href="http ://xmake.io/pages/donation .html#donate ">
35+ <a href="https ://xmake.io/about/sponsor .html">
3636 <img src="https://img.shields.io/badge/donate-us-orange.svg?style=flat-square" alt="Donate" />
3737 </a>
3838 </div >
@@ -46,20 +46,22 @@ A XMake integration in Visual Studio Code.
4646
4747You need install [ xmake] ( https://github.com/xmake-io/xmake ) first and a project with ` xmake.lua ` .
4848
49- Please see [ xmake-github] ( https://github.com/xmake-io/xmake ) and [ website] ( http ://xmake.io) if you want to known more about xmake.
49+ Please see [ xmake-github] ( https://github.com/xmake-io/xmake ) and [ website] ( https ://xmake.io) if you want to known more about xmake.
5050
5151## Features
5252
53- * Quickstart
54- * Colorization
55- * Completion Lists
56- * StatusBar
57- * Commands
58- * Configuration
59- * Build
60- * Run and Debug
61- * Record and Playback
62- * Problem
53+ * ** Project Management** : Create new projects, add files, and manage project structure
54+ * ** Language Support** : Colorization and syntax highlighting for ` xmake.lua ` files
55+ * ** IntelliSense** : Auto-completion for XMake APIs and functions
56+ * ** Status Bar** : Quick access to build configuration and actions
57+ * ** Command Palette** : Full integration with VS Code commands
58+ * ** Configuration Management** : Configure platforms, architectures, toolchains, and build modes
59+ * ** Build System** : Build, rebuild, clean, and package projects
60+ * ** Run and Debug** : Integrated debugging with multiple debugger support
61+ * ** Problem Detection** : Real-time error and warning detection
62+ * ** Macro Recording** : Record and playback command sequences
63+ * ** File Explorer** : Dedicated XMake project explorer with target management
64+ * ** Task Integration** : VS Code tasks support for XMake commands
6365
6466## Quickstart
6567
@@ -181,65 +183,272 @@ XMake envs will only be replaced for the same key, if another xmake env key is p
181183
182184We can configure them in settings.json
183185
186+ ### Basic Configuration
187+
188+ ``` json
189+ {
190+ "xmake.executable" : " xmake" ,
191+ "xmake.logLevel" : " normal" ,
192+ "xmake.buildLevel" : " normal" ,
193+ "xmake.buildDirectory" : " ${workspaceRoot}/build" ,
194+ "xmake.workingDirectory" : " ${workspaceRoot}"
195+ }
196+ ```
197+
198+ ### Advanced Configuration
199+
200+ ``` json
201+ {
202+ "xmake.executable" : " xmake" ,
203+ "xmake.logLevel" : " normal" ,
204+ "xmake.buildLevel" : " normal" ,
205+ "xmake.buildDirectory" : " ${workspaceRoot}/build" ,
206+ "xmake.installDirectory" : " " ,
207+ "xmake.packageDirectory" : " " ,
208+ "xmake.workingDirectory" : " ${workspaceRoot}" ,
209+ "xmake.androidNDKDirectory" : " " ,
210+ "xmake.QtDirectory" : " " ,
211+ "xmake.WDKDirectory" : " " ,
212+ "xmake.compileCommandsDirectory" : " .vscode" ,
213+ "xmake.compileCommandsBackend" : " clangd" ,
214+ "xmake.additionalConfigArguments" : [],
215+ "xmake.runningTargetsArguments" : {
216+ "default" : []
217+ },
218+ "xmake.debuggingTargetsArguments" : {
219+ "default" : []
220+ },
221+ "xmake.debugConfigType" : " default" ,
222+ "xmake.customDebugConfig" : {},
223+ "xmake.envBehaviour" : " merge" ,
224+ "xmake.enableSyntaxCheck" : true ,
225+ "xmake.runMode" : " runOnly"
226+ }
227+ ```
228+
229+ ### Status Bar Configuration
230+
231+ Control which buttons appear in the status bar:
232+
184233``` json
185234{
186- "configuration" : {
187- "type" : " object" ,
188- "title" : " XMake configuration" ,
189- "properties" : {
190- "xmake.executable" : {
191- "type" : " string" ,
192- "default" : " xmake" ,
193- "description" : " The xmake executable name / path"
194- },
195- "xmake.logLevel" : {
196- "type" : " string" ,
197- "default" : " normal" ,
198- "description" : " The Log Level: normal/verbose/minimal" ,
199- "enum" : [
200- " verbose" ,
201- " normal" ,
202- " minimal"
203- ]
204- },
205- "xmake.buildLevel" : {
206- "type" : " string" ,
207- "default" : " normal" ,
208- "description" : " The Build Output Level: normal/verbose/warning/debug" ,
209- "enum" : [
210- " verbose" ,
211- " normal" ,
212- " warning" ,
213- " debug"
214- ]
215- },
216- "xmake.buildDirectory" : {
217- "type" : " string" ,
218- "default" : " ${workspaceRoot}/build" ,
219- "description" : " The Build Output Directory"
220- },
221- "xmake.installDirectory" : {
222- "type" : " string" ,
223- "default" : " " ,
224- "description" : " The Install Output Directory"
225- },
226- "xmake.packageDirectory" : {
227- "type" : " string" ,
228- "default" : " " ,
229- "description" : " The Package Output Directory"
230- },
231- "xmake.workingDirectory" : {
232- "type" : " string" ,
233- "default" : " ${workspaceRoot}" ,
234- "description" : " The Project Working Directory with the root xmake.lua"
235- },
236- "xmake.androidNDKDirectory" : {
237- "type" : " string" ,
238- "default" : " " ,
239- "description" : " The Android NDK Directory"
235+ "xmake.status.showProject" : false ,
236+ "xmake.status.showXMake" : true ,
237+ "xmake.status.showPlatform" : false ,
238+ "xmake.status.showArch" : false ,
239+ "xmake.status.showMode" : false ,
240+ "xmake.status.showToolchain" : false ,
241+ "xmake.status.showTarget" : false ,
242+ "xmake.status.showBuild" : true ,
243+ "xmake.status.showRun" : true ,
244+ "xmake.status.showDebug" : true
245+ }
246+ ```
247+
248+ ### Configuration Options Details
249+
250+ | Option | Type | Default | Description |
251+ | --------| ------| ---------| -------------|
252+ | ** xmake.executable** | string | "xmake" | The xmake executable name / path |
253+ | ** xmake.logLevel** | string | "normal" | Log Level: ` verbose ` , ` normal ` , ` minimal ` |
254+ | ** xmake.buildLevel** | string | "normal" | Build Output Level: ` verbose ` , ` normal ` , ` debug ` |
255+ | ** xmake.runMode** | string | "runOnly" | Run Mode: ` runOnly ` , ` buildRun ` |
256+ | ** xmake.buildDirectory** | string | "${workspaceRoot}/build" | Build Output Directory |
257+ | ** xmake.installDirectory** | string | "" | Install Output Directory |
258+ | ** xmake.packageDirectory** | string | "" | Package Output Directory |
259+ | ** xmake.workingDirectory** | string | "${workspaceRoot}" | Project Working Directory |
260+ | ** xmake.androidNDKDirectory** | string | "" | Android NDK Directory |
261+ | ** xmake.QtDirectory** | string | "" | Qt Directory |
262+ | ** xmake.WDKDirectory** | string | "" | Windows Driver Kit Directory |
263+ | ** xmake.compileCommandsDirectory** | string | ".vscode" | compile_commands.json file directory |
264+ | ** xmake.compileCommandsBackend** | string | "clangd" | LSP backend for compile_commands |
265+ | ** xmake.additionalConfigArguments** | array | [ ] | Additional config arguments, e.g. ` ["--cc=gcc", "--myopt=xxx"] ` |
266+ | ** xmake.runningTargetsArguments** | object | {"default": [ ] } | Running targets arguments, e.g. ` {"targetName": ["args", "..."]} ` |
267+ | ** xmake.debuggingTargetsArguments** | object | {"default": [ ] } | Debugging targets arguments |
268+ | ** xmake.debugConfigType** | string | "default" | Debug configuration type: ` default ` , ` codelldb ` , ` lldb-dap ` , ` gdb-dap ` |
269+ | ** xmake.customDebugConfig** | object | {} | Custom debugging configurations |
270+ | ** xmake.envBehaviour** | string | "merge" | Environment behaviour: ` erase ` , ` merge ` , ` override ` |
271+ | ** xmake.enableSyntaxCheck** | boolean | true | Enable Lua syntax check |
272+
273+ ## XMake Explorer
274+
275+ The extension provides a dedicated XMake Explorer in the Activity Bar for project management:
276+
277+ ![ XMake Explorer] ( https://raw.githubusercontent.com/tboox/xmake-vscode/master/res/explorer.png )
278+
279+ ### Features
280+
281+ * ** Project Overview** : View all targets and their configurations
282+ * ** Target Management** : Build, rebuild, clean, run, and debug individual targets
283+ * ** Configuration Panel** : Quick access to platform, architecture, mode, and toolchain settings
284+ * ** Context Menu** : Right-click actions for quick operations
285+
286+ ### Explorer Actions
287+
288+ - ** Build All** : Build all targets in the project
289+ - ** Rebuild All** : Clean and build all targets
290+ - ** Clean All** : Clean all build artifacts
291+ - ** Run All** : Run all executable targets
292+ - ** Configure** : Open configuration settings
293+
294+ ## Available Commands
295+
296+ Access all XMake commands through the Command Palette (` Ctrl+Shift+P ` or ` Cmd+Shift+P ` ):
297+
298+ ### Project Commands
299+ - ** XMake: CreateProject** : Create a new XMake project
300+ - ** XMake: NewFiles** : Add new files to the project
301+ - ** XMake: Show Explorer** : Show/hide the XMake Explorer
302+
303+ ### Configuration Commands
304+ - ** XMake: Configure** : Configure the project
305+ - ** XMake: Clean Configure** : Clean and reconfigure the project
306+ - ** XMake: Set Target Platform** : Set the target platform
307+ - ** XMake: Set Target Architecture** : Set the target architecture
308+ - ** XMake: Set Build Mode** : Set the build mode (debug/release)
309+ - ** XMake: Set Default Target** : Set the default target
310+ - ** XMake: toolchain** : Set the toolchain
311+
312+ ### Build Commands
313+ - ** XMake: Build** : Build the current target
314+ - ** XMake: BuildAll** : Build all targets
315+ - ** XMake: Rebuild** : Rebuild the current target
316+ - ** XMake: Clean** : Clean the current target
317+ - ** XMake: CleanAll** : Clean all targets
318+
319+ ### Run and Debug Commands
320+ - ** XMake: Run** : Run the current target
321+ - ** XMake: BuildRun** : Build and run the target
322+ - ** XMake: Debug** : Start debugging
323+ - ** XMake: Launch Debug** : Launch with debugger
324+
325+ ### Package and Install Commands
326+ - ** XMake: Package** : Package the project
327+ - ** XMake: Install** : Install the project
328+ - ** XMake: Uninstall** : Uninstall the project
329+
330+ ### Utility Commands
331+ - ** XMake: BeginMacro** : Start recording commands
332+ - ** XMake: EndMacro** : Stop recording commands
333+ - ** XMake: RunMacro** : Run recorded macro
334+ - ** XMake: RunLastCommand** : Repeat the last command
335+ - ** XMake: UpdateIntellisense** : Update IntelliSense configuration
336+
337+ ## Task Integration
338+
339+ The extension supports VS Code tasks for XMake operations. Create a ` .vscode/tasks.json ` file:
340+
341+ ``` json
342+ {
343+ "version" : " 2.0.0" ,
344+ "tasks" : [
345+ {
346+ "label" : " XMake: Build" ,
347+ "type" : " xmake" ,
348+ "task" : " build" ,
349+ "problemMatcher" : [" $gcc" ],
350+ "group" : {
351+ "kind" : " build" ,
352+ "isDefault" : true
240353 }
354+ },
355+ {
356+ "label" : " XMake: Clean" ,
357+ "type" : " xmake" ,
358+ "task" : " clean" ,
359+ "problemMatcher" : []
360+ },
361+ {
362+ "label" : " XMake: Run" ,
363+ "type" : " xmake" ,
364+ "task" : " run" ,
365+ "problemMatcher" : []
241366 }
242- }
367+ ]
243368}
244369```
245370
371+ ### Available Task Types
372+
373+ - ` build ` : Build the project
374+ - ` clean ` : Clean build artifacts
375+ - ` run ` : Run the target
376+ - ` package ` : Package the project
377+ - ` install ` : Install the project
378+ - ` configure ` : Configure the project
379+
380+ ## Key Bindings
381+
382+ The extension provides the following default key bindings:
383+
384+ | Key | Command | Description |
385+ | -----| ---------| -------------|
386+ | ` F5 ` | ` xmake.onDebug ` | Start debugging (when xmake is enabled) |
387+
388+ You can customize these key bindings in VS Code preferences.
389+
390+ ## Platform-Specific Configuration
391+
392+ The extension supports platform-specific configuration. You can use platform prefixes in your settings:
393+
394+ ``` json
395+ {
396+ "xmake.executable" : " xmake" ,
397+ "windows.xmake.executable" : " xmake.exe" ,
398+ "linux.xmake.executable" : " /usr/bin/xmake" ,
399+ "osx.xmake.executable" : " /usr/local/bin/xmake"
400+ }
401+ ```
402+
403+ Supported platform prefixes:
404+ - ` windows ` for Windows
405+ - ` linux ` for Linux
406+ - ` osx ` for macOS
407+
408+ ## Troubleshooting
409+
410+ ### Common Issues
411+
412+ ** XMake not found**
413+ - Ensure XMake is installed and accessible in your system PATH
414+ - Use ` xmake.executable ` setting to specify the full path to xmake executable
415+
416+ ** IntelliSense not working**
417+ - Run ` XMake: UpdateIntellisense ` command to generate ` compile_commands.json `
418+ - Ensure your ` .vscode/c_cpp_properties.json ` references the correct compile commands file
419+ - Check that the C/C++ extension is installed and enabled
420+
421+ ** Debugging not working**
422+ - Verify your ` launch.json ` configuration has the correct target name
423+ - Check that the debugger extension (C/C++ or CodeLLDB) is installed
424+ - Ensure the debug configuration type matches your debugger extension
425+
426+ ** Build fails**
427+ - Check the output panel for detailed error messages
428+ - Verify your ` xmake.lua ` configuration is correct
429+ - Ensure all required dependencies and tools are installed
430+
431+ ### Getting Help
432+
433+ - ** Documentation** : [ XMake Official Documentation] ( https://xmake.io )
434+ - ** Issues** : [ GitHub Issues] ( https://github.com/xmake-io/xmake-vscode/issues )
435+ - ** Community** :
436+ - [ Reddit] ( https://www.reddit.com/r/xmake/ )
437+ - [ Discord] ( https://discord.gg/xmake )
438+ - [ Telegram] ( https://t.me/tbooxorg )
439+ - [ QQ Group] ( https://jq.qq.com/?_wv=1027&k=5hpwWFv )
440+
441+ ## Contributing
442+
443+ Contributions are welcome! Please see [ CONTRIBUTING.md] ( CONTRIBUTING.md ) for guidelines.
444+
445+ ## License
446+
447+ This project is licensed under the Apache License 2.0 - see the [ LICENSE] ( LICENSE ) file for details.
448+
449+ ## Donation
450+
451+ If you find this extension helpful, consider supporting the project:
452+
453+ [ ![ Donate] ( https://img.shields.io/badge/donate-us-orange.svg?style=flat-square )] ( https://xmake.io/about/sponsor.html )
454+
0 commit comments