├── .todo ├── resources ├── demo.gif ├── logo.png ├── logo.psd └── logo-128x128.png ├── .vscodeignore ├── tsconfig.json ├── src ├── extension.ts ├── config.ts ├── commands.ts ├── utils.ts └── statusbar.ts ├── .gitignore ├── webpack.config.js ├── LICENSE.md ├── CHANGELOG.md ├── README.md └── package.json /.todo: -------------------------------------------------------------------------------- 1 | 2 | ☐ Detect pause status 3 | ☐ https://github.com/Microsoft/vscode/issues/30810 4 | -------------------------------------------------------------------------------- /resources/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilbinary/vscode-statusbar-debugger/master/resources/demo.gif -------------------------------------------------------------------------------- /resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilbinary/vscode-statusbar-debugger/master/resources/logo.png -------------------------------------------------------------------------------- /resources/logo.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilbinary/vscode-statusbar-debugger/master/resources/logo.psd -------------------------------------------------------------------------------- /resources/logo-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilbinary/vscode-statusbar-debugger/master/resources/logo-128x128.png -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | **/*.map 2 | .gitignore 3 | .vscode-test/** 4 | .vscode/** 5 | out/test/** 6 | resources/*.gif 7 | resources/*.psd 8 | src/** 9 | test/** 10 | tsconfig.json 11 | webpack.config.js 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es2017", 5 | "outDir": "out", 6 | "lib": ["es2015", "es2016", "es2017"], 7 | "sourceMap": true, 8 | "rootDir": "." 9 | }, 10 | "exclude": [ 11 | "node_modules", 12 | ".vscode-test" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src/extension.ts: -------------------------------------------------------------------------------- 1 | 2 | /* IMPORT */ 3 | 4 | import './statusbar'; 5 | import * as vscode from 'vscode'; 6 | import Utils from './utils'; 7 | 8 | /* ACTIVATE */ 9 | 10 | function activate ( ctx: vscode.ExtensionContext ) { 11 | 12 | return Utils.initCommands ( ctx ); 13 | 14 | } 15 | 16 | /* EXPORT */ 17 | 18 | export {activate}; 19 | -------------------------------------------------------------------------------- /src/config.ts: -------------------------------------------------------------------------------- 1 | 2 | /* IMPORT */ 3 | 4 | import * as vscode from 'vscode'; 5 | 6 | /* CONFIG */ 7 | 8 | const Config = { 9 | 10 | get ( extension = 'statusbarDebugger' ) { 11 | 12 | return vscode.workspace.getConfiguration ().get ( extension ) as any; 13 | 14 | } 15 | 16 | }; 17 | 18 | /* EXPORT */ 19 | 20 | export default Config; 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Numerous always-ignore extensions 2 | *.diff 3 | *.err 4 | *.log 5 | *.orig 6 | *.rej 7 | *.swo 8 | *.swp 9 | *.vi 10 | *.zip 11 | *~ 12 | *.sass-cache 13 | *.ruby-version 14 | *.rbenv-version 15 | 16 | # OS or Editor folders 17 | ._* 18 | .cache 19 | .DS_Store 20 | .idea 21 | .project 22 | .settings 23 | .tmproj 24 | *.esproj 25 | *.sublime-project 26 | *.sublime-workspace 27 | nbproject 28 | Thumbs.db 29 | .fseventsd 30 | .DocumentRevisions* 31 | .TemporaryItems 32 | .Trashes 33 | 34 | # Other paths to ignore 35 | bower_components 36 | node_modules 37 | package-lock.json 38 | out 39 | .vscode-test 40 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | 2 | /* IMPORT */ 3 | 4 | const path = require ( 'path' ); 5 | 6 | /* CONFIG */ 7 | 8 | const config = { 9 | target: 'node', 10 | entry: './src/extension.ts', 11 | output: { 12 | path: path.resolve ( __dirname, 'out' ), 13 | filename: 'extension.js', 14 | libraryTarget: 'commonjs2', 15 | devtoolModuleFilenameTemplate: 'file:///[absolute-resource-path]' 16 | }, 17 | devtool: 'source-map', 18 | externals: { 19 | vscode: 'commonjs vscode', 20 | fsevents: 'commonjs fsevents' 21 | }, 22 | resolve: { 23 | extensions: ['tsx', '.ts', '.jsx', '.js'] 24 | }, 25 | module: { 26 | rules: [{ 27 | test: /\.ts$/, 28 | exclude: /node_modules/, 29 | use: [ 30 | { 31 | loader: 'ts-loader' 32 | } 33 | ] 34 | }] 35 | } 36 | } 37 | 38 | /* EXPORT */ 39 | 40 | module.exports = config; 41 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017-present Fabio Spampinato 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a 6 | copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation 8 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | and/or sell copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/commands.ts: -------------------------------------------------------------------------------- 1 | 2 | /* IMPORT */ 3 | 4 | import * as vscode from 'vscode'; 5 | import Config from './config'; 6 | import Utils from './utils'; 7 | 8 | /* COMMANDS */ 9 | 10 | async function start () { 11 | 12 | const config = Config.get (); 13 | 14 | if ( config.command === 'start' ) { 15 | 16 | vscode.commands.executeCommand ( 'workbench.action.debug.start' ); 17 | 18 | } else if ( config.command === 'select' ) { 19 | 20 | vscode.commands.executeCommand ( 'workbench.action.debug.selectandstart' ); 21 | 22 | } else if ( config.command === 'auto' ) { 23 | 24 | try { 25 | 26 | await vscode.commands.executeCommand ( 'debugLauncher.auto' ); 27 | 28 | } catch ( e ) { 29 | 30 | const nr = await Utils.getLaunchConfigurationsNr (); 31 | 32 | if ( !nr ) { 33 | 34 | vscode.commands.executeCommand ( 'debug.addConfiguration' ); 35 | 36 | } else if ( nr === 1 ){ 37 | 38 | vscode.commands.executeCommand ( 'workbench.action.debug.start' ); 39 | 40 | } else if ( nr > 1 ) { 41 | 42 | vscode.commands.executeCommand ( 'workbench.action.debug.selectandstart' ); 43 | 44 | } 45 | 46 | } 47 | 48 | } 49 | 50 | } 51 | 52 | async function stop () { 53 | 54 | vscode.commands.executeCommand ( 'workbench.action.debug.stop' ); 55 | 56 | } 57 | 58 | async function restart () { 59 | 60 | try { 61 | 62 | await vscode.commands.executeCommand ( 'debugLauncher.auto' ); 63 | 64 | } catch ( e ) { 65 | 66 | vscode.commands.executeCommand ( 'workbench.action.debug.restart' ); 67 | 68 | } 69 | 70 | } 71 | 72 | /* EXPORT */ 73 | 74 | export {start, stop, restart}; 75 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### Version 2.0.7 2 | - Update .github/FUNDING.yml 3 | - Deleted repo-level github funding.yml 4 | - Minor improvements to the used icons 5 | 6 | ### Version 2.0.6 7 | - Improved description of the “statusbarDebugger.command” setting 8 | 9 | ### Version 2.0.5 10 | - Fixed a regression regarding detecting existing launch configurations 11 | 12 | ### Version 2.0.4 13 | - Properly restarting debuggers launched via Debug Launcher 14 | 15 | ### Version 2.0.3 16 | - Readme: using hi-res logo 17 | 18 | ### Version 2.0.2 19 | - Outputting modern code (es2017, faster) 20 | - Using "Debug Launcher" for debugging 21 | 22 | ### Version 2.0.1 23 | - Properly detecting if “Debug Launcher” is installed 24 | 25 | ### Version 2.0.0 26 | - Added support for “Debug Launcher” 27 | 28 | ### Version 1.4.5 29 | - Fixed a regression 30 | 31 | ### Version 1.4.4 32 | - Bundling with webpack 33 | 34 | ### Version 1.4.3 35 | - Readme: updated hint for disabling the floating debugger 36 | 37 | ### Version 1.4.2 38 | - Ensuring all instances of each token get replaced 39 | 40 | ### Version 1.4.1 41 | - Improved active session detection 42 | 43 | ### Version 1.4.0 44 | - Support for changing the icon of each action 45 | 46 | ### Version 1.3.3 47 | - Updated readme 48 | 49 | ### Version 1.3.2 50 | - Readme: added an hint about the debug launcher 51 | 52 | ### Version 1.3.1 53 | - Fixed a typo 54 | 55 | ### Version 1.3.0 56 | - Added support for disabling some or all actions 57 | - Added a `template` setting 58 | - Added support for displaying the name of the current debugging session 59 | - Added a `command `option 60 | - Added support for a smart `auto` command 61 | - Watching `launch.json` for changes 62 | 63 | ### Version 1.2.0 64 | - Added options for customizing alignment and priority 65 | 66 | ### Version 1.1.2 67 | - Improved support for `Start Without Debugging` 68 | 69 | ### Version 1.1.1 70 | - Updated readme 71 | 72 | ### Version 1.1.0 73 | - Auto-detection of start/stop events 74 | 75 | ### Version 1.0.2 76 | - Added a `pause` action button 77 | 78 | ### Version 1.0.2 79 | - Added a setting for changed the bug's color when active 80 | 81 | ### Version 1.0.1 82 | - Changed bug's color when active 83 | 84 | ### Version 1.0.0 85 | - Initial release 86 | -------------------------------------------------------------------------------- /src/utils.ts: -------------------------------------------------------------------------------- 1 | 2 | /* IMPORT */ 3 | 4 | import * as _ from 'lodash'; 5 | import * as absolute from 'absolute'; 6 | import * as fs from 'fs'; 7 | import * as JSON5 from 'json5'; 8 | import * as path from 'path'; 9 | import * as pify from 'pify'; 10 | import * as vscode from 'vscode'; 11 | import * as Commands from './commands'; 12 | 13 | /* UTILS */ 14 | 15 | const Utils = { 16 | 17 | initCommands ( context: vscode.ExtensionContext ) { 18 | 19 | const {commands} = vscode.extensions.getExtension ( 'fabiospampinato.vscode-statusbar-debugger' ).packageJSON.contributes; 20 | 21 | commands.forEach ( ({ command }) => { 22 | 23 | const commandName = _.last ( command.split ( '.' ) ) as string, 24 | handler = Commands[commandName], 25 | disposable = vscode.commands.registerCommand ( command, () => handler () ); 26 | 27 | context.subscriptions.push ( disposable ); 28 | 29 | }); 30 | 31 | return Commands; 32 | 33 | }, 34 | 35 | async getLaunchConfigurationsNr () { 36 | 37 | const rootPath = Utils.folder.getActiveRootPath () as string; //TSC 38 | 39 | if ( !rootPath ) return 0; 40 | 41 | const launchPath = path.join ( rootPath, '.vscode', 'launch.json' ); 42 | 43 | if ( !launchPath ) return 0; 44 | 45 | const content = await Utils.file.read ( launchPath ); 46 | 47 | if ( !content ) return 0; 48 | 49 | const contentj = _.attempt ( JSON5.parse, content ) as any; //TSC 50 | 51 | if ( _.isError ( contentj ) ) return 0; 52 | 53 | const {configurations} = contentj; 54 | 55 | if ( !_.isArray ( configurations ) ) return 0; 56 | 57 | return configurations.length; 58 | 59 | }, 60 | 61 | file: { 62 | 63 | async read ( filepath ) { 64 | 65 | try { 66 | return ( await pify ( fs.readFile )( filepath, { encoding: 'utf8' } ) ).toString (); 67 | } catch ( e ) { 68 | return; 69 | } 70 | 71 | } 72 | 73 | }, 74 | 75 | folder: { 76 | 77 | getRootPath ( basePath? ) { 78 | 79 | const {workspaceFolders} = vscode.workspace; 80 | 81 | if ( !workspaceFolders ) return; 82 | 83 | const firstRootPath = workspaceFolders[0].uri.fsPath; 84 | 85 | if ( !basePath || !absolute ( basePath ) ) return firstRootPath; 86 | 87 | const rootPaths = workspaceFolders.map ( folder => folder.uri.fsPath ), 88 | sortedRootPaths = _.sortBy ( rootPaths, [path => path.length] ).reverse (); // In order to get the closest root 89 | 90 | return sortedRootPaths.find ( rootPath => basePath.startsWith ( rootPath ) ); 91 | 92 | }, 93 | 94 | getActiveRootPath () { 95 | 96 | const {activeTextEditor} = vscode.window, 97 | editorPath = activeTextEditor && activeTextEditor.document.uri.fsPath; 98 | 99 | return Utils.folder.getRootPath ( editorPath ); 100 | 101 | } 102 | 103 | } 104 | 105 | }; 106 | 107 | /* EXPORT */ 108 | 109 | export default Utils; 110 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # StatusBar Debugger 2 | 3 |

4 | Logo 5 |

6 | 7 | Adds a debugger to the statusbar, less intrusive than the default floating one. 8 | 9 | If you have [Debug Launcher](https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-debug-launcher) installed this extension will use it. 10 | 11 | ## Install 12 | 13 | Follow the instructions in the [Marketplace](https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-statusbar-debugger), or run the following in the command palette: 14 | 15 | ```shell 16 | ext install fabiospampinato.vscode-statusbar-debugger 17 | ``` 18 | 19 | ## Usage 20 | 21 | Just start/stop a debugging session and it will detect it. 22 | 23 | It adds a "bug" icon and the name of the current debug session to the statusbar, you can use it to toggle debugging. This can be customized via the `statusbarDebugger.template` setting. Once a debugging session has started the usual actions will appear next to it. 24 | 25 | ## Settings 26 | 27 | Most of these settings require a window reload in order for them to take effect. 28 | 29 | ```js 30 | { 31 | "statusbarDebugger.template": "$(bug) [name]", // Template used for rendering the statusbar item, by default a "bug" icon and the name of the current debug session 32 | "statusbarDebugger.command": "auto", // Command to execute when clicking the "bug" icon. Possible values are: - "start": always start the active configuration - "select": always ask to select the configuration - "auto": execute `debugLauncher.auto` (provided by the Debug Launcher extension) or start debugging if it detects only one configuration or ask for a selection if there are more than one. If a debug session is active the command will always be to stop debugging 33 | "statusbarDebugger.actions": ["pause", "continue", "step_over", "step_into", "step_out", "restart", "stop"], // List of enabled actions' buttons 34 | "statusbarDebugger.actionsIcons": ["❙❙", "$(triangle-right)", "$(arrow-right)", "$(arrow-down)", "$(arrow-up)", "$(mail-reply)", "$(primitive-square)"], // Icons for the actions' buttons 35 | "statusbarDebugger.activeColor": "", // The color of the statusbar item when debugging 36 | "statusbarDebugger.alignment": "left", // Should the item be placed to the left or right? 37 | "statusbarDebugger.priority": -10 // The priority of this item. Higher value means the item should be shown more to the left 38 | } 39 | ``` 40 | 41 | ## Demo 42 | 43 | ![Demo](resources/demo.gif) 44 | 45 | ## Hints 46 | 47 | - **Disable the default floating debugger**: set `"debug.toolBarLocation": "hidden"` in your settings to disable the default, intrusive, debugger. 48 | - **Disable the default debug launcher**: set `"debug.showInStatusBar": "never"` in yout settings to disable the default debug launcher present in the statusbar. 49 | - **Icons**: [here](https://octicons.github.com/) you can browse a list of supported icons. If for instance you click the first icon, you'll get a page with `.octicon-alert` written in it, to get the string to use simply remove the `.octicon-` part, so in this case the icon name would be `alert`. 50 | 51 | ## Related 52 | 53 | - **[Debug Launcher](https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-debug-launcher)**: Start debugging, without having to define any tasks or launch configurations, even from the terminal. 54 | 55 | ## Contributing 56 | 57 | If you found a problem, or have a feature request, please open an [issue](https://github.com/fabiospampinato/vscode-statusbar-debugger/issues) about it. 58 | 59 | If you want to make a pull request you can debug the extension using [Debug Launcher](https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-debug-launcher). 60 | 61 | ## License 62 | 63 | MIT © Fabio Spampinato 64 | -------------------------------------------------------------------------------- /src/statusbar.ts: -------------------------------------------------------------------------------- 1 | 2 | /* IMPORT */ 3 | 4 | import * as _ from 'lodash'; 5 | import * as chokidar from 'chokidar'; 6 | import * as path from 'path'; 7 | import * as vscode from 'vscode'; 8 | import Config from './config'; 9 | import Utils from './utils'; 10 | 11 | /* STATUSBAR */ 12 | 13 | class Statusbar { 14 | 15 | config; bug; actions; _isActive; _watcher; 16 | 17 | constructor () { 18 | 19 | this.init (); 20 | this.events (); 21 | 22 | } 23 | 24 | init () { 25 | 26 | this.initConfig (); 27 | this.initBug (); 28 | this.initActions (); 29 | 30 | } 31 | 32 | initConfig () { 33 | 34 | this.updateConfig (); 35 | 36 | } 37 | 38 | async initBug () { 39 | 40 | this.bug = this.makeItem ( {}, this.config.alignment, this.config.priority ); 41 | await this.updateBug (); 42 | this.bug.show (); 43 | 44 | } 45 | 46 | initActions () { 47 | 48 | const actionsOptions = [ 49 | { name: 'pause', text: '', tooltip: 'Pause', command: 'workbench.action.debug.pause' }, 50 | { name: 'continue', text: '', tooltip: 'Continue', command: 'workbench.action.debug.continue' }, 51 | { name: 'step_over', text: '', tooltip: 'Step over', command: 'workbench.action.debug.stepOver' }, 52 | { name: 'step_into', text: '', tooltip: 'Step into', command: 'workbench.action.debug.stepInto' }, 53 | { name: 'step_out', text: '', tooltip: 'Step out', command: 'workbench.action.debug.stepOut' }, 54 | { name: 'restart', text: '', tooltip: 'Restart', command: 'statusbarDebugger.restart' }, 55 | { name: 'stop', text: '', tooltip: 'Stop', command: 'workbench.action.debug.stop' } 56 | ]; 57 | 58 | actionsOptions.forEach ( ( actionOption, i ) => actionOption.text = this.config.actionsIcons[i] ) 59 | 60 | const enabledActionsOptions = actionsOptions.filter ( actionOption => _.includes ( this.config.actions, actionOption.name ) ); 61 | 62 | this.actions = enabledActionsOptions.map ( ( options, index ) => this.makeItem ( options, this.config.alignment, this.config.priority - index - 1 ) ); 63 | 64 | } 65 | 66 | events () { 67 | 68 | vscode.debug.onDidStartDebugSession ( () => this.update () ); 69 | vscode.debug.onDidTerminateDebugSession ( () => this.update () ); 70 | vscode.debug.onDidChangeActiveDebugSession ( () => this.update () ); 71 | 72 | } 73 | 74 | makeItem ( options, alignment, priority ) { 75 | 76 | const item = vscode.window.createStatusBarItem ( alignment, priority ); 77 | 78 | _.extend ( item, options ); 79 | 80 | return item; 81 | 82 | } 83 | 84 | renderTemplate ( template ) { 85 | 86 | const tokens = { 87 | name: _.get ( vscode.debug.activeDebugSession, 'name' ) || '' // Better to show nothing than a useless `No Configurations` 88 | }; 89 | 90 | _.forOwn ( tokens, ( value, key ) => { 91 | 92 | const re = new RegExp ( `\\[${_.escapeRegExp ( key )}\\]`, 'g' ); 93 | 94 | template = template.replace ( re, value ); 95 | 96 | }); 97 | 98 | template = _.trim ( template ); 99 | 100 | return template; 101 | 102 | } 103 | 104 | update ( active = !!vscode.debug.activeDebugSession ) { 105 | 106 | this._isActive = active; 107 | 108 | this.updateConfig (); 109 | this.updateBug (); 110 | this.updateActions (); 111 | 112 | } 113 | 114 | updateConfig () { 115 | 116 | this.config = Config.get (); 117 | this.config.alignment = ( this.config.alignment === 'right' ) ? vscode.StatusBarAlignment.Right : vscode.StatusBarAlignment.Left; 118 | 119 | } 120 | 121 | async updateBug () { 122 | 123 | this.bug.text = this.renderTemplate ( this.config.template ); 124 | this.bug.color = this._isActive ? this.config.activeColor : undefined; 125 | 126 | let tooltip, command; 127 | 128 | if ( this._isActive ) { 129 | 130 | tooltip = 'Stop Debugging'; 131 | command = 'statusbarDebugger.stop'; 132 | 133 | } else { 134 | 135 | tooltip = 'Start Debugging'; 136 | command = 'statusbarDebugger.start'; 137 | 138 | } 139 | 140 | this.bug.tooltip = tooltip; 141 | this.bug.command = command; 142 | 143 | } 144 | 145 | updateActions () { 146 | 147 | const method = this._isActive ? 'show' : 'hide'; 148 | 149 | this.actions.forEach ( ( action, i ) => action.text = this.config.actionsIcons[i] ); 150 | this.actions.forEach ( action => action[method]() ); 151 | 152 | } 153 | 154 | } 155 | 156 | /* EXPORT */ 157 | 158 | const statusbar = new Statusbar (); 159 | 160 | export default statusbar; 161 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vscode-statusbar-debugger", 3 | "displayName": "StatusBar Debugger", 4 | "description": "Adds a debugger to the statusbar, less intrusive than the default floating one", 5 | "icon": "resources/logo-128x128.png", 6 | "version": "2.0.7", 7 | "license": "MIT", 8 | "main": "out/extension.js", 9 | "publisher": "fabiospampinato", 10 | "author": { 11 | "name": "Fabio Spampinato", 12 | "email": "spampinabio@gmail.com" 13 | }, 14 | "bugs": { 15 | "url": "https://github.com/fabiospampinato/vscode-statusbar-debugger/issues" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "https://github.com/fabiospampinato/vscode-statusbar-debugger" 20 | }, 21 | "engines": { 22 | "vscode": "^1.15.0" 23 | }, 24 | "keywords": [ 25 | "vscode", 26 | "vsc", 27 | "statusbar", 28 | "debug", 29 | "debugger" 30 | ], 31 | "categories": [ 32 | "Debuggers" 33 | ], 34 | "activationEvents": [ 35 | "*" 36 | ], 37 | "contributes": { 38 | "configuration": { 39 | "type": "object", 40 | "title": "StatusBar Debugger - Configuration", 41 | "properties": { 42 | "statusbarDebugger.template": { 43 | "type": "string", 44 | "description": "Template used for rendering the statusbar item, by default a \"bug\" icon and the name of the current debug session", 45 | "default": "$(bug) [name]" 46 | }, 47 | "statusbarDebugger.command": { 48 | "type": "string", 49 | "description": "Command to execute when clicking the \"bug\" icon. Possible values are:\n - \"start\": always start the active configuration\n - \"select\": always ask to select the configuration\n - \"auto\": execute `debugLauncher.auto` (provided by the Debug Launcher extension) or start debugging if it detects only one configuration or ask for a selection if there are more than one\nIf a debug session is active the command will always be to stop debugging", 50 | "default": "auto" 51 | }, 52 | "statusbarDebugger.actions": { 53 | "type": "array", 54 | "items": { 55 | "type": "string" 56 | }, 57 | "description": "List of enabled actions' buttons", 58 | "default": [ 59 | "pause", 60 | "continue", 61 | "step_over", 62 | "step_into", 63 | "step_out", 64 | "restart", 65 | "stop" 66 | ] 67 | }, 68 | "statusbarDebugger.actionsIcons": { 69 | "type": "array", 70 | "items": { 71 | "type": "string" 72 | }, 73 | "description": "Icons for the actions' buttons", 74 | "default": [ 75 | "❙ ❙", 76 | "$(triangle-right)", 77 | "$(arrow-right)", 78 | "$(arrow-down)", 79 | "$(arrow-up)", 80 | "$(mail-reply)", 81 | "$(primitive-square)" 82 | ] 83 | }, 84 | "statusbarDebugger.activeColor": { 85 | "type": "string", 86 | "description": "The color of the statusbar item when debugging", 87 | "default": "" 88 | }, 89 | "statusbarDebugger.alignment": { 90 | "type": "string", 91 | "description": "Should the item be placed to the left or right?", 92 | "default": "left" 93 | }, 94 | "statusbarDebugger.priority": { 95 | "type": "number", 96 | "description": "The priority of this item. Higher value means the item should be shown more to the left", 97 | "default": -10 98 | } 99 | } 100 | }, 101 | "commands": [ 102 | { 103 | "command": "statusbarDebugger.start", 104 | "title": "StatusBar Debugger: Start" 105 | }, 106 | { 107 | "command": "statusbarDebugger.stop", 108 | "title": "StatusBar Debugger: Stop" 109 | }, 110 | { 111 | "command": "statusbarDebugger.restart", 112 | "title": "StatusBar Debugger: Restart" 113 | } 114 | ] 115 | }, 116 | "scripts": { 117 | "vscode:prepublish": "rm -rf out && webpack --mode production", 118 | "compile": "webpack --mode development", 119 | "compile:watch": "webpack --mode development --watch", 120 | "postinstall": "node ./node_modules/vscode/bin/install", 121 | "test": "node ./node_modules/vscode/bin/test" 122 | }, 123 | "dependencies": { 124 | "@types/lodash": "^4.14.118", 125 | "@types/node": "^10.12.8", 126 | "absolute": "0.0.1", 127 | "chokidar": "^1.7.0", 128 | "json5": "^0.5.1", 129 | "lodash": "^4.17.4", 130 | "pify": "^3.0.0" 131 | }, 132 | "devDependencies": { 133 | "ts-loader": "^5.2.1", 134 | "typescript": "^2.4.1", 135 | "vscode": "^1.1.4", 136 | "webpack": "^4.20.2", 137 | "webpack-cli": "^3.1.2" 138 | } 139 | } 140 | --------------------------------------------------------------------------------