Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Run and Debug buttons #48

Open
mbeps opened this issue Mar 9, 2021 · 2 comments
Open

Adding Run and Debug buttons #48

mbeps opened this issue Mar 9, 2021 · 2 comments

Comments

@mbeps
Copy link

mbeps commented Mar 9, 2021

Currently, on VSCode the run and debug buttons are combined. This is inconvenient as if there are breakpoints present the program will enter debug mode. I have to rely on key binding which have separate commands for run (will ignore breakpoints) and debug. I tried to add these 2 commands in VSCode Action Buttons but I would get errors. Is there a way of making this work?

    "actionButtons": {
        "defaultColor": "white", // Can also use string color names.
        "loadNpmCommands":false, // Disables automatic generation of actions for npm commands.
        // "reloadButton":"↻", // Custom reload button text or icon (default ↻). null value enables automatic reload on configuration change
        "commands": [
            {
                "name": "Run",
                "color": "green",
                "command": "workbench.action.debug.run"
            },
            {
                "name": "Debug",
                "color": "red",
                "command": "workbench.action.debug.start"
            }
        ]
    }, 

This is the error that I get:
image

I would assume is that it can only run commands from terminal and not VSCode. If this is the case, how can I make it run commands from VSCode?

@Slurpgoose
Copy link

came here to ask this as well.
My use case is to run tasks same as I would with keybindings.json.

[
    {
        "key": "cmd+shift+0",
        "command": "workbench.action.tasks.runTask",
        "args": "Run Server"
    }
]

The reason the default behavior does not work for me is I would like to be able to run multiple scripts in a split integrated terminal using a single command

tasks.json

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Run Server",
            "dependsOn": [
                "PositionHandler",
                "Strategy Runner",
                "Mock Exchange",
            ]
        },
        {
            "type": "npm",
            "script": "runner",
            "path": "Communications/",
            "label": "Strategy Runner",
            "presentation": {
                "reveal": "always",
                "clear": false,
                "focus": true,
                "group": "runner"
            }
        },
        {
            "type": "npm",
            "script": "mockExchange",
            "path": "Communications/",
            "label": "Mock Exchange",
            "presentation": {
                "reveal": "always",
                "clear": false,
                "focus": true,
                "group": "runner"
            }
        },
        {
            "type": "npm",
            "script": "positionHandler",
            "path": "Communications/",
            "label": "PositionHandler",
            "presentation": {
                "reveal": "always",
                "focus": true,
                "clear": false,
                "group": "runner"
            }
        }
    ]
}

@makarychev13
Copy link

+1

A much needed feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants