Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

Add doc on how to start multiple debuggers in same vscode window #6

Closed
alexkli opened this issue Aug 5, 2019 · 1 comment
Closed
Assignees
Labels
task Something to do

Comments

@alexkli
Copy link
Contributor

alexkli commented Aug 5, 2019

Originally reported and contributed by @moritzraho

The doc states that only one debugger can be started per vscode window, which is not true anymore.
In fact, vscode debug config has the concept of compounds which allows to aggregate multiple configurations.
This also enables debugging for sequences OOTB (i.e. by starting a wskdebug instance for all the actions of a sequence). Which makes wskdebug even more useful :)
Here is a launch.json example that exposes a config starting 2 wskdebug instances:

{
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "mypackage/action1",
      "runtimeExecutable": "wskdebug",
      "args": [
        "tmypackage/action1",
        "${workspaceFolder}/action1.js"
      ],
      "localRoot": "${workspaceFolder}/actions/hello",
      "remoteRoot": "/code",
      "outputCapture": "std"
    },
    {
      "type": "node",
      "request": "launch",
      "name": "mypackage/action2",
      "runtimeExecutable": "wskdebug",
      "args": [
        "mypackage/action2",
        "${workspaceFolder}/action2.js"
      ],
      "localRoot": "${workspaceFolder}/actions/hello2",
      "remoteRoot": "/code",
      "outputCapture": "std"
    }
  ],
  "compounds": [
    {
      "name": "All actions",
      "configurations": [
        "mypackage/action1",
        "mypackage/action2"
      ]
    }
  ]
}
@alexkli alexkli added the task Something to do label Aug 5, 2019
@alexkli
Copy link
Contributor Author

alexkli commented Aug 5, 2019

Fixed by #7.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
task Something to do
Projects
None yet
Development

No branches or pull requests

1 participant