Search This Blog

Monday, March 2, 2020

VSCode Visual Basic Code - Editor Custom Command Settings

1. Create/Import your project in VSCode editor
2. There you can see .vscode folder is created under your root folder, else create a folder .vscode 
3. Create keybindings.json, tasks.json and paste the below code and customize it.
4. Use the shortcut key mentioned in keybindings.json for ex: Ctrl+M
5. All your targets is displayed in the View
6. Select and see that is executing in the terminal window.


keybindings.json

{
    "key": "ctrl+r+t",
    "command": "workbench.action.tasks.runTask",
    "args": "Run tests"
}

tasks.json


    //https://code.visualstudio.com/docs/editor/tasks#vscode
    "version": "2.0.0",
    "tasks": [
        {
            "label": "CodeQuality : Folder",
            "type": "shell",
            "command": "java -jar -Dfiles=\"d:/D:/drvijay/\" D:/works/app-0.1.jar"         
        },
        {
            "label": "CodeQuality : Excludes",
            "type": "shell",
            "command": "java -jar -Dfiles=\"d:/D:/drvijay/\" -Dexcludes=\"HCC,FCLC\"  D:/works/app-0.1.jar"         
        },
        {
            "label": "CodeQuality : Merge",
            "type": "shell",
            "command": "java -jar -Dfiles=\"d:/D:/drvijay/\" -Dmerge=\"d:/Test.properties\" D:/works/app-0.1.jar"         
        },
        {
            "label": "CodeQuality : Report",
            "type": "shell",
            "command": "java -jar -Dfiles=\"d:/D:/drvijay/Test.java\" -Doutputdir=\"D:/reportfolder/\" D:/works/app-0.1.jar"         
        }
    ]
}

See the screenshot






No comments:

Hit Counter


View My Stats