Added a launch configuration to start debugging both server + extension
This commit is contained in:
parent
1598a614b2
commit
400d1da490
6 changed files with 57 additions and 36 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -131,7 +131,6 @@ dmypy.json
|
|||
|
||||
**/node_modules
|
||||
**/out
|
||||
**/.vscode/settings.json
|
||||
notes.txt
|
||||
cached_embeddings.pkl
|
||||
.ruff_cache
|
||||
|
|
|
|||
14
.vscode/launch.json
vendored
14
.vscode/launch.json
vendored
|
|
@ -3,6 +3,16 @@
|
|||
// 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)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Server",
|
||||
|
|
@ -19,7 +29,7 @@
|
|||
// What about a watch task? - type errors?
|
||||
},
|
||||
{
|
||||
"name": "VSCode Extension",
|
||||
"name": "Extension (VSCode)",
|
||||
"type": "extensionHost",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}/extension",
|
||||
|
|
@ -29,7 +39,7 @@
|
|||
"outFiles": [
|
||||
"${workspaceFolder}/extension/out/**/*.js"
|
||||
],
|
||||
"preLaunchTask": "vscode-extension:build-watch",
|
||||
"preLaunchTask": "vscode-extension:build",
|
||||
"env": {
|
||||
"CONTINUE_SERVER_URL": "http://localhost:8001"
|
||||
}
|
||||
|
|
|
|||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"python.defaultInterpreterPath": "${workspaceFolder}/continuedev/.venv/bin/python",
|
||||
}
|
||||
61
.vscode/tasks.json
vendored
61
.vscode/tasks.json
vendored
|
|
@ -1,44 +1,53 @@
|
|||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "vscode-extension:build-watch",
|
||||
"type": "npm",
|
||||
"script": "esbuild-watch",
|
||||
"path": "extension",
|
||||
"isBackground": true,
|
||||
"label": "vscode-extension:build",
|
||||
"dependsOn": [
|
||||
// To detect compile errors
|
||||
"vscode-extension:tsc",
|
||||
// To bundle the code the same way we do for publishing
|
||||
"vscode-extension:esbuild"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": [
|
||||
// We rely on tsc to emit type errors in a separate task
|
||||
],
|
||||
// Depends on prevents the task from running until the other task has completed, not want we want
|
||||
// does not start the extension
|
||||
// "dependsOn": [
|
||||
// // esbuild does not emit type errors so we need a separate task for that
|
||||
// // https://esbuild.github.io/content-types/#typescript
|
||||
// "vscode-extension:tsc-watch"
|
||||
// ]
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "vscode-extension:tsc-watch",
|
||||
"label": "vscode-extension:esbuild",
|
||||
"type": "npm",
|
||||
"script": "watch",
|
||||
"script": "esbuild",
|
||||
"path": "extension",
|
||||
"isBackground": true,
|
||||
"problemMatcher": [
|
||||
"$tsc-watch"
|
||||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "> (.*?):([0-9]+):([0-9]+): (warning|error): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
// Tsc currently errors out due to testing setup issues, will be resolved in a different PR
|
||||
// This will be useful for preventing debugging if there are compile errors
|
||||
{
|
||||
"label": "vscode-extension:tsc",
|
||||
"type": "shell",
|
||||
"command": "echo lol",
|
||||
// "script": "tsc",
|
||||
// "path": "extension",
|
||||
"problemMatcher": [
|
||||
"$tsc"
|
||||
],
|
||||
// Problems are currently broken due to path resolution not being relative to the workspace root
|
||||
// The way cursorless does it it by having top level package.json which is not ideal.
|
||||
// Multi root workspaces would help here
|
||||
"presentation": {
|
||||
"revealProblems": "onProblem",
|
||||
"clear": true
|
||||
"clear": true,
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
|
|
|
|||
|
|
@ -185,17 +185,17 @@
|
|||
"scripts": {
|
||||
"vscode:prepublish": "npm run esbuild-base -- --minify",
|
||||
"esbuild-base": "rm -rf ./out && esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node",
|
||||
"esbuild": "rm -rf ./out && node esbuild.mjs",
|
||||
"esbuild": "npm run esbuild-base -- --sourcemap",
|
||||
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
|
||||
"test-compile": "tsc -p ./",
|
||||
"tsc": "tsc -p ./",
|
||||
"tsc-watch": "tsc -watch -p ./",
|
||||
"typegen": "node scripts/typegen.js",
|
||||
"clientgen": "rm -rf src/client/ && npx @openapitools/openapi-generator-cli generate -i ../schema/openapi.json -g typescript-fetch -o src/client/ --additional-properties=supportsES6=true,npmVersion=8.19.2,typescriptThreePlus=true",
|
||||
"rebuild": "electron-rebuild -v 19.1.8 node-pty",
|
||||
"watch": "tsc -watch -p ./",
|
||||
"pretest": "npm run compile && npm run lint",
|
||||
"pretest": "npm run build && npm run lint",
|
||||
"lint": "eslint src --ext ts",
|
||||
"test": "node ./out/test/runTest.js",
|
||||
"jest": "jest --config ./jest.config.js",
|
||||
"typegen": "node scripts/typegen.js",
|
||||
"package": "npm install && npm run typegen && npm run clientgen && cd react-app && npm install && npm run build && cd .. && mkdir -p ./build && vsce package --out ./build"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
@ -244,4 +244,4 @@
|
|||
"optionalDependencies": {
|
||||
"@esbuild/android-arm": "^0.18.17"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ import * as vscode from "vscode";
|
|||
import * as os from "os";
|
||||
import fkill from "fkill";
|
||||
import { finished } from "stream/promises";
|
||||
import * as request from "request";
|
||||
import request = require("request");
|
||||
|
||||
const exec = promisify(execCb);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue