summaryrefslogtreecommitdiff
path: root/.vscode/launch.json
blob: 702544fe434d12d0e3dee4967cbcd43c641960ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "compounds": [
    {
      "name": "Server + Extension (VSCode)",
      "stopAll": true,
      "configurations": [
        "Server",
        "Extension (VSCode)"
      ]
    },
    {
      "name": "Server + Tests (VSCode)",
      "stopAll": true,
      "configurations": [
        "Server",
        "Tests (VSCode)"
      ]
    }
  ],
  "configurations": [
    {
      "name": "Server",
      "type": "python",
      "request": "launch",
      "module": "continuedev.src.continuedev.server.main",
      "args": [
        "--port",
        "8001"
      ],
      "justMyCode": false,
      "subProcess": false,
      // Does it need a build task?
      // What about a watch task? - type errors?
    },
    {
      "name": "Extension (VSCode)",
      "type": "extensionHost",
      "request": "launch",
      "cwd": "${workspaceFolder}/extension",
      "args": [
        // Pass a directory to manually test in
        "${workspaceFolder}/extension/manual-testing-sandbox",
        "${workspaceFolder}/extension/manual-testing-sandbox/example.ts",
        "--extensionDevelopmentPath=${workspaceFolder}/extension",
      ],
      "outFiles": [
        "${workspaceFolder}/extension/out/**/*.js"
      ],
      "preLaunchTask": "vscode-extension:build",
      "env": {
        "CONTINUE_SERVER_URL": "http://localhost:65432"
      }
    },
    // Has to be run after starting the server (separately or using the compound configuration)
    {
      "name": "Tests (VSCode)",
      "type": "extensionHost",
      "request": "launch",
      "cwd": "${workspaceFolder}/extension",
      "runtimeExecutable": "${execPath}",
      "args": [
        // Pass a directory to run tests in
        "${workspaceFolder}/extension/manual-testing-sandbox",
        "--extensionDevelopmentPath=${workspaceFolder}/extension",
        "--extensionTestsPath=${workspaceFolder}/extension/out/test-runner/mochaRunner"
      ],
      "outFiles": [
        // Allows setting breakpoints in test suites across the /src folder
        "${workspaceFolder}/extension/out/test-suites/**/*.js",
        // Allows setting breakpoints in mocha test runner file
        "${workspaceFolder}/extension/out/test-runner/**/*.js"
      ],
      "internalConsoleOptions": "openOnSessionStart",
      "preLaunchTask": "vscode-extension:tests:build",
      "env": {
        "CONTINUE_SERVER_URL": "http://localhost:8001",
        // Avoid timing out when stopping on breakpoints during debugging in VSCode
        "MOCHA_TIMEOUT": "0",
      },
    }
  ]
}