From 718cd3f5afc6fa0f7aca3b76a10741d9eb3e5a47 Mon Sep 17 00:00:00 2001
From: ozzafar <48795672+ozzafar@users.noreply.github.com>
Date: Thu, 16 Jul 2026 15:18:04 +0300
Subject: [PATCH 1/4] Refactor build process: update .gitignore, .vscodeignore,
and package.json; add esbuild.js for bundling
---
.gitignore | 1 +
.vscodeignore | 8 +-
esbuild.js | 57 ++++++
package-lock.json | 493 ++++++++++++++++++++++++++++++++++++++++++++++
package.json | 10 +-
5 files changed, 565 insertions(+), 4 deletions(-)
create mode 100644 esbuild.js
diff --git a/.gitignore b/.gitignore
index be7c44f..9e0ec99 100644
--- a/.gitignore
+++ b/.gitignore
@@ -420,4 +420,5 @@ FodyWeavers.xsd
node_modules/*
out/*
+dist/*
.vscode-test/*
\ No newline at end of file
diff --git a/.vscodeignore b/.vscodeignore
index 24f8a50..af03773 100644
--- a/.vscodeignore
+++ b/.vscodeignore
@@ -1,12 +1,18 @@
.vscode/**
.vscode-test/**
+.github/**
src/**
+out/**
+node_modules/**
+docs/**
+debugmcp-ad/**
+.pytest_cache/**
.gitignore
.yarnrc
+esbuild.js
vsc-extension-quickstart.md
**/tsconfig.json
**/eslint.config.mjs
**/*.map
**/*.ts
**/.vscode-test.*
-debugmcp-ad/**
diff --git a/esbuild.js b/esbuild.js
new file mode 100644
index 0000000..3a0fbfc
--- /dev/null
+++ b/esbuild.js
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation.
+
+const esbuild = require('esbuild');
+
+const production = process.argv.includes('--production');
+const watch = process.argv.includes('--watch');
+
+/**
+ * Bundles the extension into a single CommonJS file so the published VSIX ships
+ * one JS file instead of the entire production node_modules tree. `vscode` is
+ * kept external because it is provided by the host at runtime.
+ * @type {import('esbuild').Plugin}
+ */
+const esbuildProblemMatcherPlugin = {
+ name: 'esbuild-problem-matcher',
+ setup(build) {
+ build.onStart(() => {
+ console.log('[esbuild] build started');
+ });
+ build.onEnd((result) => {
+ result.errors.forEach(({ text, location }) => {
+ console.error(`✘ [ERROR] ${text}`);
+ if (location) {
+ console.error(` ${location.file}:${location.line}:${location.column}`);
+ }
+ });
+ console.log('[esbuild] build finished');
+ });
+ },
+};
+
+async function main() {
+ const ctx = await esbuild.context({
+ entryPoints: ['src/extension.ts'],
+ bundle: true,
+ format: 'cjs',
+ minify: production,
+ sourcemap: !production,
+ sourcesContent: false,
+ platform: 'node',
+ outfile: 'dist/extension.js',
+ external: ['vscode'],
+ logLevel: 'silent',
+ plugins: [esbuildProblemMatcherPlugin],
+ });
+ if (watch) {
+ await ctx.watch();
+ } else {
+ await ctx.rebuild();
+ await ctx.dispose();
+ }
+}
+
+main().catch((e) => {
+ console.error(e);
+ process.exit(1);
+});
diff --git a/package-lock.json b/package-lock.json
index bb2bf63..77c88b2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -22,6 +22,7 @@
"@typescript-eslint/parser": "^8.56.0",
"@vscode/test-cli": "^0.0.12",
"@vscode/test-electron": "^2.5.2",
+ "esbuild": "^0.28.1",
"eslint": "^10.0.1",
"typescript": "^5.9.3"
},
@@ -39,6 +40,448 @@
"node": ">=18"
}
},
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz",
+ "integrity": "sha1-egGo0uwvuy2seK2tCbD6eB5Agr4=",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/android-arm/-/android-arm-0.28.1.tgz",
+ "integrity": "sha1-cEvSl95tdi3lTqu+r79V9nVqvi8=",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz",
+ "integrity": "sha1-tUCifRTkr9BYSWpNvsTT9BTbEQo=",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/android-x64/-/android-x64-0.28.1.tgz",
+ "integrity": "sha1-0csWbTSw+/D+irRgpVlPJKN4cB4=",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz",
+ "integrity": "sha1-EDSyZFf8iGNo/mG70J9lP2r6jlQ=",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz",
+ "integrity": "sha1-ZVVqQyoeTXIDLYIYwZMvzKGkl3I=",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz",
+ "integrity": "sha1-LmHgWS+QMNfj2uGO4l68U1kYrvY=",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz",
+ "integrity": "sha1-yV7CiZWe+AecTcqBeh4sS+Zrm9M=",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz",
+ "integrity": "sha1-wJoPZ5F1kqwN6JKpvk04FN69Kmw=",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz",
+ "integrity": "sha1-QLIhdd2gYYLz7oFBGGxf8wTEpxc=",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz",
+ "integrity": "sha1-pYD5xnZ5eDOJHlGfx6EzfIr9jbM=",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz",
+ "integrity": "sha1-RkUs8yHcf56Rwvp4Cla7Vuec1os=",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz",
+ "integrity": "sha1-QhGzGE3WYI9T3LIuOfXTTuCIUsg=",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz",
+ "integrity": "sha1-aXhXwqYcubC2u2ZS5AwdxeHKjl0=",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz",
+ "integrity": "sha1-0ZKUPrFGpArExkl9DPe+NbmGvwg=",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz",
+ "integrity": "sha1-rOoDVtoODrwI+Xz3ucLkAeHmSNw=",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz",
+ "integrity": "sha1-bww84MtkxTS3DExF7LLBbTTjXf0=",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz",
+ "integrity": "sha1-i813B3oNzjN4tXT+2ybSolO3PTY=",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz",
+ "integrity": "sha1-5/sqAemcgwyU5mI82f77TI+1g0c=",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz",
+ "integrity": "sha1-xSkJNy24uG4sVeBaiUADO1Zgo7I=",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz",
+ "integrity": "sha1-xCe5vlpkwmL/mn63C1+7qt9EbGw=",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz",
+ "integrity": "sha1-3JsUe6yi5sSzyFVxdB70hgpIkJc=",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz",
+ "integrity": "sha1-zoZtEt8TwV5MmfBzo9Rm9uBkmzo=",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz",
+ "integrity": "sha1-dGjjaS0B1inVlB5dg4F7uA+eObQ=",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz",
+ "integrity": "sha1-pbwAY/sryrbQ7WPyoVN5WLwmnsY=",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz",
+ "integrity": "sha1-EAZO5E9DR7kMmgK0Rrv4CpFjKxI=",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
"node_modules/@eslint-community/eslint-utils": {
"version": "4.9.1",
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz",
@@ -499,6 +942,7 @@
"integrity": "sha512-IgSWvLobTDOjnaxAfDTIHaECbkNlAlKv2j5SjpB2v7QHKv1FIfjwMy8FsDbVfDX/KjmCmYICcw7uGaXLhtsLNg==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@typescript-eslint/scope-manager": "8.56.0",
"@typescript-eslint/types": "8.56.0",
@@ -757,6 +1201,7 @@
"integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
"dev": true,
"license": "MIT",
+ "peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -1480,6 +1925,48 @@
"node": ">= 0.4"
}
},
+ "node_modules/esbuild": {
+ "version": "0.28.1",
+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/esbuild/-/esbuild-0.28.1.tgz",
+ "integrity": "sha1-70W0Y0ycnZeilq6kEUpfmED5VXg=",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.28.1",
+ "@esbuild/android-arm": "0.28.1",
+ "@esbuild/android-arm64": "0.28.1",
+ "@esbuild/android-x64": "0.28.1",
+ "@esbuild/darwin-arm64": "0.28.1",
+ "@esbuild/darwin-x64": "0.28.1",
+ "@esbuild/freebsd-arm64": "0.28.1",
+ "@esbuild/freebsd-x64": "0.28.1",
+ "@esbuild/linux-arm": "0.28.1",
+ "@esbuild/linux-arm64": "0.28.1",
+ "@esbuild/linux-ia32": "0.28.1",
+ "@esbuild/linux-loong64": "0.28.1",
+ "@esbuild/linux-mips64el": "0.28.1",
+ "@esbuild/linux-ppc64": "0.28.1",
+ "@esbuild/linux-riscv64": "0.28.1",
+ "@esbuild/linux-s390x": "0.28.1",
+ "@esbuild/linux-x64": "0.28.1",
+ "@esbuild/netbsd-arm64": "0.28.1",
+ "@esbuild/netbsd-x64": "0.28.1",
+ "@esbuild/openbsd-arm64": "0.28.1",
+ "@esbuild/openbsd-x64": "0.28.1",
+ "@esbuild/openharmony-arm64": "0.28.1",
+ "@esbuild/sunos-x64": "0.28.1",
+ "@esbuild/win32-arm64": "0.28.1",
+ "@esbuild/win32-ia32": "0.28.1",
+ "@esbuild/win32-x64": "0.28.1"
+ }
+ },
"node_modules/escalade": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
@@ -1515,6 +2002,7 @@
"integrity": "sha512-20MV9SUdeN6Jd84xESsKhRly+/vxI+hwvpBMA93s+9dAcjdCuCojn4IqUGS3lvVaqjVYGYHSRMCpeFtF2rQYxQ==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.8.0",
"@eslint-community/regexpp": "^4.12.2",
@@ -1745,6 +2233,7 @@
"resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
"integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"accepts": "^2.0.0",
"body-parser": "^2.2.1",
@@ -2149,6 +2638,7 @@
"resolved": "https://registry.npmjs.org/hono/-/hono-4.12.26.tgz",
"integrity": "sha512-uyZtpnYxM9CmQ7QsQknM4zN8EftNqhON1qYeIKM0Se67CCEe2c44xyGURwB0axX2fBDu1dqHrHAc1hmNT8ITkw==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=16.9.0"
}
@@ -3732,6 +4222,7 @@
"integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
"dev": true,
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=12"
},
@@ -3807,6 +4298,7 @@
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"dev": true,
"license": "Apache-2.0",
+ "peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -4122,6 +4614,7 @@
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
"license": "MIT",
+ "peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
diff --git a/package.json b/package.json
index 067a4a5..ff5ff3f 100644
--- a/package.json
+++ b/package.json
@@ -48,7 +48,7 @@
"onStartupFinished",
"onDebug"
],
- "main": "./out/extension.js",
+ "main": "./dist/extension.js",
"contributes": {
"commands": [
{
@@ -96,10 +96,13 @@
}
},
"scripts": {
- "vscode:prepublish": "npm run compile",
+ "vscode:prepublish": "npm run package",
"compile": "tsc -p ./",
+ "check-types": "tsc --noEmit -p ./",
+ "bundle": "node esbuild.js",
+ "package": "npm run check-types && node esbuild.js --production",
"watch": "tsc -watch -p ./",
- "pretest": "npm run compile && npm run lint",
+ "pretest": "npm run compile && npm run bundle && npm run lint",
"lint": "eslint src",
"test": "vscode-test"
},
@@ -117,6 +120,7 @@
"@typescript-eslint/parser": "^8.56.0",
"@vscode/test-cli": "^0.0.12",
"@vscode/test-electron": "^2.5.2",
+ "esbuild": "^0.28.1",
"eslint": "^10.0.1",
"typescript": "^5.9.3"
},
From e51ea247056d58a3f6e5597b4a72d226f8e57540 Mon Sep 17 00:00:00 2001
From: ozzafar <48795672+ozzafar@users.noreply.github.com>
Date: Sat, 18 Jul 2026 21:08:10 +0300
Subject: [PATCH 2/4] Add pause execution functionality to debugging tools and
documentation
---
docs/architecture/debugMCPServer.md | 1 +
docs/architecture/debuggingExecutor.md | 1 +
skills/debug-live/SKILL.md | 5 ++++-
src/debugMCPServer.ts | 10 +++++++++-
src/debuggingExecutor.ts | 14 ++++++++++++++
src/debuggingHandler.ts | 26 ++++++++++++++++++++++++++
src/test/debuggingHandler.test.ts | 1 +
src/test/startDebuggingMatrix.test.ts | 1 +
8 files changed, 57 insertions(+), 2 deletions(-)
diff --git a/docs/architecture/debugMCPServer.md b/docs/architecture/debugMCPServer.md
index 3e7e97a..fdaa90d 100644
--- a/docs/architecture/debugMCPServer.md
+++ b/docs/architecture/debugMCPServer.md
@@ -68,6 +68,7 @@ Each request creates a new stateless `StreamableHTTPServerTransport` instance th
| `stop_debugging` | Stop current session |
| `step_over/into/out` | Stepping commands |
| `continue_execution` | Continue to next breakpoint |
+| `pause_execution` | Interrupt a running program (no breakpoint needed) |
| `restart_debugging` | Restart session |
| `add/remove_breakpoint` | Breakpoint management |
| `clear_all_breakpoints` | Remove all breakpoints |
diff --git a/docs/architecture/debuggingExecutor.md b/docs/architecture/debuggingExecutor.md
index 728f661..fc6c4f2 100644
--- a/docs/architecture/debuggingExecutor.md
+++ b/docs/architecture/debuggingExecutor.md
@@ -45,6 +45,7 @@ Stepping and control operations use VS Code's command system:
- `workbench.action.debug.stepInto`
- `workbench.action.debug.stepOut`
- `workbench.action.debug.continue`
+- `workbench.action.debug.pause`
- `workbench.action.debug.restart`
### DAP Custom Requests
diff --git a/skills/debug-live/SKILL.md b/skills/debug-live/SKILL.md
index 660d6d9..ac8c010 100644
--- a/skills/debug-live/SKILL.md
+++ b/skills/debug-live/SKILL.md
@@ -14,6 +14,7 @@ allowed-tools:
- step_into
- step_out
- continue_execution
+ - pause_execution
- get_variables_values
- evaluate_expression
---
@@ -57,7 +58,9 @@ If you can step through the code in a few tool calls, do that instead of specula
program either hits a breakpoint (`stopped`) or runs to completion without pausing
(`terminated`).
4. **Navigate and inspect.** Use `step_over`, `step_into`, `step_out`, `continue_execution`
- to move through code. Use `get_variables_values` to see local/global state and
+ to move through code. Use `pause_execution` to interrupt a freely-running program
+ (e.g. a busy loop or embedded target) when there is no breakpoint to stop at.
+ Use `get_variables_values` to see local/global state and
`evaluate_expression` to test hypotheses live (call methods, read properties, run
list comprehensions, etc.).
5. **Find the root cause** (see framework below). Don't stop at the first wrong thing
diff --git a/src/debugMCPServer.ts b/src/debugMCPServer.ts
index 30f8c07..d6345a2 100644
--- a/src/debugMCPServer.ts
+++ b/src/debugMCPServer.ts
@@ -162,7 +162,7 @@ export class DebugMCPServer {
server.registerTool('start_debugging', {
description: 'Start a VS Code debug session for a source file, optionally for a single test method. ' +
'Use when investigating bugs, failing tests, wrong/null variable values, unexpected runtime behavior, ' +
- 'or any "it doesn\'t work" report where stepping through the code is cheaper than speculation.',
+ 'or any "it doesn\'t work" report.',
inputSchema: {
fileFullPath: z.string().describe('Full path to the source code file to debug'),
workingDirectory: z.string().describe('Working directory for the debug session'),
@@ -221,6 +221,14 @@ export class DebugMCPServer {
return { content: [{ type: 'text' as const, text: result }] };
});
+ // Pause execution tool
+ server.registerTool('pause_execution', {
+ description: 'Interrupt a running program and stop at its current location, even when no breakpoint is set. Useful for busy loops or embedded/bare-metal targets running freely — then inspect variables or step from where it stopped.',
+ }, async () => {
+ const result = await this.debuggingHandler.handlePause();
+ return { content: [{ type: 'text' as const, text: result }] };
+ });
+
// Restart debugging tool
server.registerTool('restart_debugging', {
description: 'Restart the debug session from the beginning with the same configuration.',
diff --git a/src/debuggingExecutor.ts b/src/debuggingExecutor.ts
index 1c7d169..58941df 100644
--- a/src/debuggingExecutor.ts
+++ b/src/debuggingExecutor.ts
@@ -30,6 +30,7 @@ export interface IDebuggingExecutor {
stepInto(): Promise