console.log() automatically inserts "- script.js:1" inside the string while typing
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Type: Bug
1. Open Visual Studio Code.
2. Create a new JavaScript file (script.js).
3. Type:
console.log("
4. Continue typing any text, for example:
JS File is Executed
5. When typing the closing quotation mark (") or completing the statement, VS Code automatically inserts:
- script.js:1
inside the string.
Expected Result:
The editor should only keep the text that I typed.
Actual Result:
VS Code automatically modifies the string and appends:
- script.js:1
Example:
Expected:
console.log("JS File is Executed");
Actual:
console.log("JS File is Executed - script.js:1");
This happens while editing JavaScript files.
It is not browser console output.
The text is inserted directly into the source code while typing.
The issue persists after checking my settings.json.
VS Code version: Code 1.131.0 (e4c7e7b1d6d060162f4aa7f8225271b67ce1df75, 2026-07-28T10:51:25Z)
OS version: Windows_NT x64 10.0.26200
Modes:
System Info
|Item|Value|
|---|---|
|CPUs|11th Gen Intel(R) Core(TM) i5-1155G7 @ 2.50GHz (8 x 2496)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0x9a49 [Intel(R) Iris(R) Xe Graphics], DRIVER_VENDOR=Intel, DRIVER_VERSION=30.0.101.1692 *ACTIVE*
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8875
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|15.75GB (6.03GB free)|
|Process Argv|--crash-reporter-id 12e9588d-0113-4579-a663-65b2d4bff882|
|Screen Reader|no|
|VM|67%|
Extensions (50)
Name|Identifier|Author|Version
---|---|---|---
Android|adelphes.android-dev-ext|adelphes|1.4.0
CodeSnap|adpyke.codesnap|adpyke|1.3.4
Claude Code for VS Code|anthropic.claude-code|Anthropic|2.1.221
Simple React Snippets|burkeholland.simple-react-snippets|burkeholland|1.2.8
npm Intellisense|christian-kohler.npm-intellisense|christian-kohler|1.4.5
Office Viewer|cweijan.vscode-office|cweijan|4.1.8
Dadroit JSON Generator|dadroit.dadroit-json-generator|Dadroit|1.2.2
ESLint|dbaeumer.vscode-eslint|dbaeumer|3.0.34
jQuery Code Snippets|donjayamanne.jquerysnippets|donjayamanne|0.0.1
ES7+ React/Redux/React-Native snippets|dsznajder.es7-react-js-snippets|dsznajder|4.4.3
Prettier - Code formatter|esbenp.prettier-vscode|esbenp|12.4.0
Expo Tools|expo.vscode-expo-tools|expo|1.6.3
GitHub Actions|github.vscode-github-actions|github|0.32.3
Gemini Code Assist|google.geminicodeassist|google|2.93.0
JSON Viewer for Debug|hendiaome.json-viewer-for-debug|hendiaome|1.1.0
JSON Schema Studio|istalri.json-schema-studio|istalri|1.0.2
MagicPython|magicstack.magicpython|magicstack|1.1.0
PDF Viewer|mathematic.vscode-pdf|mathematic|0.1.11
Rainbow CSV|mechatroner.rainbow-csv|mechatroner|3.24.1
Container Tools|ms-azuretools.vscode-containers|ms-azuretools|2.4.5
Kubernetes|ms-kubernetes-tools.vscode-kubernetes-tools|ms-kubernetes-tools|1.4.1
Python Debugger|ms-python.debugpy|ms-python|2026.6.0
Python|ms-python.python|ms-python|2026.4.0
Pylance|ms-python.vscode-pylance|ms-python|2026.3.1
Python Environments|ms-python.vscode-python-envs|ms-python|1.36.0
Jupyter|ms-toolsai.jupyter|ms-toolsai|2025.9.1
Jupyter Keymap|ms-toolsai.jupyter-keymap|ms-toolsai|1.1.2
Jupyter Notebook Renderers|ms-toolsai.jupyter-renderers|ms-toolsai|1.3.0
Jupyter Cell Tags|ms-toolsai.vscode-jupyter-cell-tags|ms-toolsai|0.1.9
Jupyter Slide Show|ms-toolsai.vscode-jupyter-slideshow|ms-toolsai|0.1.6
Dev Containers|ms-vscode-remote.remote-containers|ms-vscode-remote|0.466.0
CMake Tools|ms-vscode.cmake-tools|ms-vscode|1.23.52
C/C++ DevTools|ms-vscode.cpp-devtools|ms-vscode|0.5.13
C/C++|ms-vscode.cpptools|ms-vscode|1.33.5
C/C++ Extension Pack|ms-vscode.cpptools-extension-pack|ms-vscode|1.5.1
React Native Tools|msjsdiag.vscode-react-native|msjsdiag|1.13.0
Material Icon Theme|pkief.material-icon-theme|PKief|5.37.0
pyCage|pranjalkitn.py-cage|PranjalKitN|0.1.3
SQLite Viewer|qwtel.sqlite-viewer|qwtel|25.12.2
YAML|redhat.vscode-yaml|redhat|1.24.0
Live Server|ritwickdey.liveserver|ritwickdey|5.7.10
output-formatter|saikatdas.output-formatter|SaikatDas|1.2.4
JSON Server|sarthikbhat.json-server|sarthikbhat|0.0.4
JSON5 KIT|savh.json5-kit|savh|0.5.0
Code Spell Checker|streetsidesoftware.code-spell-checker|streetsidesoftware|4.5.6
Adaptive Card Previewer|teamsdevapp.vscode-adaptive-cards|TeamsDevApp|0.1.3
JSON Debug Visualizer|timheuer.jsondbg|timheuer|0.2.3
TensorFlow Snippets|vahidk.tensorflow-snippets|vahidk|0.3.3
Quokka.js|wallabyjs.quokka-vscode|WallabyJs|1.0.766
IntelliJ Git|wmbgmbh.intellij-git-ext|WMBGmbH|0.1.0
A/B Experiments
```
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
4f60g487:31327383
envsactivate1:31551504
gh487529:31544284
cloudbuttont:31379625
3efgi100_wstrepl:31403338
55ia6109:31457054
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
c3h7c220:31478652
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
test_treatment2:31471001
c9b86496:31447327
capico_axe_098a3278:31555651
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
chat:31457767
8hig5102:31480529
89g7j272:31518289
7e187181:31503455
i2gc6536:31499202
52612955:31516516
ghj88844:31499326
ec1eg703:31520046
ddid_t:31478206
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
cdk-lw-on:31524445
f9bf7985:31543584
a1ije391_t:31540920
41836166:31537719
jbcp_cls_pctr_t:31531130
61138546:31518536
cp_intellij_t_nes:31548657
d7b18187:31526828
nes-curr-leftover-1500:31538366
ahp-both-windows:31556933
h561g132:31533256
sessions_5:31532894
ihg5j128:31534457
f412h606:31551416
9gg7f176:31542112
nes-ex-cf-euporie-03:31542868
5fe6f778:31554331
allow-none:31555437
6i51c363:31551401
c7c27ce7:31554789
nes-gb3-nf-5k:31554345
8hc4g144:31558143
1532g621_copy:31554320
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
session-mark-done:31558131
```
Contributor guide
Assessment
This issue has not been assessed yet.