MyDebug Config Management
Assembles the configuration folder an application reads when you run it locally.
Pick an environment and an instance from a config repository, and the extension collects the matching files,
fills {{KEY}} placeholders from a PAM vault (or from values you enter by hand), applies your local overrides and
writes the result to a target folder. The source repository is only ever read; the write target cannot be inside it.
The VS Code edition of the IntelliJ IDEA plugin of the same name.
It is written in TypeScript and needs neither Java nor any other extension.
Watch the walkthrough of the IntelliJ edition
Repository layout it expects
<root>/<environment>/<common>/* shared files
<root>/<environment>/<instance>/* instance-specific files (wins when the same name exists in both)
The output is flat: <application folder>/<config sub-path>/<file>.
Nothing is hard-coded: root folder, excluded folders, target path and the JVM property name all come from settings.
Features
- One vault request — every distinct placeholder is resolved from a single GET, cached in memory for a
configurable time.
- Manual values — no vault at hand? Set Values come from to manual and store a JSON object such as
{"DB_PASSWORD": "secret"}; placeholders are filled from it instead. A full vault response works as well.
- Secrets stay out of settings files — the vault URL (it contains the token) and the manual values are kept in the
VS Code secret storage. They are never written to
settings.json, never logged and never part of an error message.
- Protected files — a protected file is never opened and never written, so hand-edited local files survive.
- Overrides — key-level overrides from a table or a
KEY=VALUE file; unknown keys produce a warning instead of
being added silently.
- Preview first — nothing is written until you press Write; click a row for a diff against the current file.
- Byte-exact output — only the matched
{{...}} range and overridden values change. CRLF/LF, indentation and
trailing whitespace are preserved, no BOM is added, XML files are never parsed. Files are written to a temporary
file, moved into place and read back to verify. Files whose content did not change are not rewritten.
- Missing keys stay visible — a key that is absent (or empty) in the vault is left as a placeholder, never
written as an empty value.
- Branches — Refresh / Switch Branch fetches, lets you pick a branch from a searchable list, pulls it
(fast-forward only) and shows which settings changed. Pick the current branch to just pull the latest commits.
- Java launches — add
--config dev or --config dev:dev02 to the args of a Java launch configuration
(optional --no-pam, --refresh). The config is written, -D<property>=<application folder> is added to vmArgs
and the arguments are removed before they reach the application.
Precedence: protected file (never opened) → repository value → vault / manual values → override table → overrides file.
Usage
Settings, MyDebug Config Management: root folder, excluded folders, application folder, config sub-path,
protected files, overrides. For example:
"mydebugConfig.rootFolder": "C:/work/config-repo",
"mydebugConfig.applicationFolder": "C:/work/app-home",
"mydebugConfig.configSubPath": "config",
"mydebugConfig.protectedPatterns": ["datasource.properties", "log4j2*"],
"mydebugConfig.overrides": [{ "key": "CACHE_TTL_SECONDS", "value": "5", "file": "application.properties" }]
Run MyDebug Config: Set Vault URL (full address including the token, for example
https://vault.example.test/secrets?token=...) and set Data field name if the key→value map sits in a field of
the response. Or set Values come from to manual and run MyDebug Config: Set Manual Values.
MyDebug Config: Test Connection / Check Values lists the key names it received.
Open the MyDebug Config view in the panel, choose environment and instance, then Resolve and Write.
Commands
| Command |
What it does |
| MyDebug Config: Show |
Opens the MyDebug Config view. |
| MyDebug Config: Select Environment and Instance |
Picks the environment and the instance; the choice is remembered per workspace. |
| MyDebug Config: Resolve and Write |
Resolves, shows the preview and writes after confirmation. |
| MyDebug Config: Resolve Without PAM |
Same, without asking the vault or the manual values; placeholders stay as they are. |
| MyDebug Config: Refetch from PAM |
Same as Resolve and Write, but ignores the cache. |
| MyDebug Config: Refresh / Switch Branch |
git fetch --prune, branch picker, checkout, fast-forward pull, settings diff. |
| MyDebug Config: Open Output Folder |
Opens the write target in the file manager. |
| MyDebug Config: Test Connection / Check Values |
Asks the vault (or checks the manual values) and lists the key names, never the values. |
| MyDebug Config: Toggle Show Values |
Shows or masks every value that does not come straight from the repository. |
| MyDebug Config: Set Vault URL |
Stores the vault address in the secret storage. |
| MyDebug Config: Set Manual Values |
Stores a JSON object (pasted or loaded from a file) in the secret storage. |
| MyDebug Config: Clear Stored Secrets |
Removes both from the secret storage and empties the cache. |
Settings
| Setting |
Default |
|
mydebugConfig.valuesSource |
vault |
vault or manual. User setting. |
mydebugConfig.dataField |
|
Response field holding the key→value map; empty = the root object. User setting. |
mydebugConfig.connectTimeoutMs / readTimeoutMs |
5000 / 15000 |
User settings. |
mydebugConfig.cacheMinutes |
25 |
In-memory cache of the vault values; not reset when the branch changes. User setting. |
mydebugConfig.truststore |
|
PEM file with a custom CA, only needed on a certificate error. User setting. |
mydebugConfig.rootFolder |
|
Root of the config repository. |
mydebugConfig.excludedFolders |
.git, .idea |
Folders that are not environments. |
mydebugConfig.commonFolder |
common |
|
mydebugConfig.applicationFolder |
|
Files go to <application folder>/<config sub-path>. |
mydebugConfig.configSubPath |
|
|
mydebugConfig.jvmProperty |
app.dir |
-D<name>=<application folder> for Java launches that use --config. |
mydebugConfig.protectedPatterns |
[] |
Names or * ? patterns of files that are never opened and never written. |
mydebugConfig.overrides |
[] |
{ "key", "value", "file" } rows; an empty file means all non-XML files. |
mydebugConfig.overridesFile |
|
KEY=VALUE file; takes priority over the table. |
mydebugConfig.addIfMissing |
false |
Append override keys that are not in any file. |
mydebugConfig.backup |
true |
Create a .bak-<date> copy before replacing a file. |
Path settings accept ~, ${workspaceFolder} and paths relative to the first workspace folder.
The extension is disabled in untrusted workspaces: it runs git in the root folder and writes files to the target.
Requirements
git on the PATH for the branch features. Nothing else.
Build and test
npm install
npm run compile # strict TypeScript to out/
npm test # unit tests of the core with node:test (out/core has no vscode import)
npm run package # mydebug-config-management-<version>.vsix
npm run test:ide # end-to-end test in a real VS Code with a separate profile
The core also runs on its own: node out/core/cli.js --root <root> --list.
License
Apache-2.0
| |