Find the static strings that are alive in the Java application you run from VS Code — by key or by value — and change
them while the application keeps running. No restart, no breakpoint.
The extension attaches a small agent (Java 8+, no dependencies) to your Java launches. The list is read from the
running JVM, so it shows what the application really holds right now.
Search by key or value — type part of a class name, a field name, a map key or the text itself.
Static String fields — private and static final ones included.
Static maps and Properties — String entries of static Map fields are listed as Class.FIELD[key].
Change the value live — double-click a row, type the new text, apply. Constants that the compiler inlined can be
changed too, by rewriting the string in place.
Revert — changed rows are bold and can be put back to their original value from the context menu.
Usage
Install the extension (it requires Debugger for Java, which is installed with it).
Start your application with Run or Debug as usual.
Open the Static Values tab in the bottom panel (or run Static Values: Show), search, double-click a row.
How a value is changed
Choice
What happens
Use it for
Assign a new string to the field
The static field points to a new String
Non-final fields, finals computed at run time
Put a new string into the map
map.put(key, value)
Map entries (fails on unmodifiable maps)
Rewrite the existing string in place
The characters of the String object are replaced
Compile-time constants, which javac inlines where they are used
Limits worth knowing:
Rewriting in place changes every use of that literal in the whole JVM, not only the field you picked.
A constant that javac merged into a longer one ("prefix" + CONSTANT) no longer exists on its own and cannot be changed.
Code that the JIT already compiled around a static final value may keep using the old value.
Classes that are loaded but not initialized yet are not listed.
Settings
Setting
Default
staticValues.attach
true
Attach the agent to Java launches (also: Static Values: Toggle Attaching to Java Launches).
staticValues.maxRows
5000
Largest number of rows one search returns.
The agent opens one loopback connection to VS Code and does nothing until you search. Nothing leaves the machine.