bpasero/debug-electron-vscode 28
Sample repository for being able to debug main and renderer from one debug session
The hackable text editor
Opens chrome://gpu inside a Electron window
:bangbang: Matches strings against configurable strings, globs, regular expressions, and/or functions
asp-starter
Quick Navigate for Atom
issue commentmicrosoft/vscode
Revisit introduction of `mainLockfile`
Actually, given we already put a vscode.lock file into the workspace storage folder whenever an instance is running, I wonder if the js-debug extensions couldn't simply scan the <user data>/User/workspaceStorage folder for a folder that contains such a file. That should be a sufficient enough indicator to figure out if an instance is running.
Still, to be entirely sure the instance was not crashing leaving this file around, you would probably have to check the file contents and do similar logic as Alex had to implement, otherwise it would only be a guess.
comment created time in 21 days
push eventmicrosoft/vscode
commit sha da77887f997f15da82eac4fa1a201e96aabfda82
editor memento - make sure to dispose config listener
push time in 22 days
issue openedmicrosoft/vscode
Settings editor for enums should handle `undefined` for `default`
I added a auto default.
//cc @rzhao271 maybe this is a bug for the settings editor: if a setting is a enum without a default, shouldn't the dropdown indicate this by not showing the setting?
Originally posted by @bpasero in https://github.com/microsoft/vscode/issues/128345#issuecomment-877578431
created time in 22 days
issue commentmicrosoft/vscode
Default presentation of Explorer: Copy Relative Path Separator in Setting editor is confusing
I added a auto default.
//cc @rzhao271 maybe this is a bug for the settings editor: if a setting is a enum without a default, shouldn't the dropdown indicate this by not showing the setting?
comment created time in 22 days
push eventmicrosoft/vscode
commit sha 4ee40e74e1e29178f05f82d026b555490c726772
Default presentation of Explorer: Copy Relative Path Separator in Setting editor is confusing (fix #128345)
push time in 22 days
issue closedmicrosoft/vscode
Default presentation of Explorer: Copy Relative Path Separator in Setting editor is confusing
Issue Type: <b>Bug</b>
Would be noticeable on Windows because of (implicit) default \\.
Steps to reproduce:
0. Make sure you are using Windows and reset explorer.copyRelativePathSeparator to default value.
-
Open Settings view and search for
explorer.copyRelativePathSeparator- dropdown has/displayed (and setting not changed - no blue border).
-
Perform Copy Relative Path - path copied with
\\in it (while dropdown displays/) -
Change setting to
\\and then "back" to/- setting now marked as changed
-
Perform Copy Relative Path - path copied with
/in it as expected
I think it's because this setting doesn't have default value and dropdown will display first from list, however implementation has different logic.
VS Code version: Code - Insiders 1.59.0-insider (87d692b7bf1eb5a663b3e62620a6e7e436e1838c, 2021-07-09T05:13:26.890Z) OS version: Windows_NT x64 10.0.19041 Restricted Mode: No
<details> <summary>System Info</summary>
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 x 3192) |
| GPU Status | 2d_canvas: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>oop_rasterization: enabled<br>opengl: enabled_on<br>rasterization: enabled<br>skia_renderer: enabled_on<br>video_decode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 31.72GB (15.15GB free) |
| Process Argv | --crash-reporter-id cf52dbde-2c94-45c3-9bf3-45d8b9966b04 |
| Screen Reader | no |
| VM | 0% |
</details>Extensions: none<details> <summary>A/B Experiments</summary>
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30291494
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256198
pythonvspyt639:30291487
pythontb:30258533
vspre833:30321513
pythonptprofiler:30281269
vsdfh931cf:30280410
vshan820:30294714
pythondataviewer:30285072
vscus158:30321503
pythonvsuse255:30319630
vscorehov:30301224
vscod805cf:30301675
pythonvspyt200:30323110
vscextlangct:30310089
vsccppwt:30312692
bridge0708:30335490
</details>
<!-- generated by issue reporter -->
closed time in 22 days
IllusionMHpush eventmicrosoft/vscode
commit sha 4f90d8086538cab199af4c5de33b75b72537db8a
files.partcipants.timeout doesn't handle the undefined case (fix #128335)
push time in 22 days
issue closedmicrosoft/vscode
`files.partcipants.timeout` doesn't handle the undefined case
As part of my work for https://github.com/microsoft/vscode/issues/125422 I discovered that const timeout = this.configurationService.getValue<number>('files.participants.timeout'); expects a number but at least in the test cases this value is undefined. Adding the below type safety code leads to many working copy tests failing.
if (typeof timeout !== 'number') {
return;
}
closed time in 22 days
lramos15pull request commentmicrosoft/vscode
Use platform specific default value for separator
@IllusionMH we cannot set a default that is platform specific because a windows box might be connected to a linux remote. We only know the standard path separator at the time we copy the path by checking the remote OS.
comment created time in 22 days
issue openedmicrosoft/vscode
Revisit introduction of `mainLockfile`
It looks like recently a mainLockfile was added to signal whether a user data dir is in use or not (microsoft/vscode/commit/126218be8798646ca3b36dd13d4702a380d98b3f#). I see numerous issues with that:
- writing a file on startup slows down startup, especially if the process has to wait for that to happen. We typically only tolerate this when there is very strong need for it and try to avoid this at all costs (cc @jrieken)
- dealing with files as a means to lock a folder is complicated. you cannot assume that
lifecycleMainService.onWillShutdownis ever called, the application might crash leaving a stale lock file around (cc @alexdima who just implemented a locking solution that avoids these kind of issues for the extension host state process via https://github.com/microsoft/vscode/commit/b1b44a3910c7df865eea155c3c367c2ec085b2bd)
I don't really understand why the existing IPC socket cannot be used to figure out if an instance is running? The IPC handle is statically computed based on some properties that can all be determined by reading package.json and or product.json:
https://github.com/microsoft/vscode/blob/126218be8798646ca3b36dd13d4702a380d98b3f/src/vs/platform/environment/electron-main/environmentMainService.ts#L54-L54
created time in 22 days
issue commentmicrosoft/vscode
MarkdownString Hover images broken
/duplicate https://github.com/microsoft/vscode/issues/119786
comment created time in 22 days
push eventmicrosoft/vscode
commit sha 966eaaee01d571384dc261b76eea9d2f728c0d9e
prepare for vacation
push time in 22 days
issue openedmicrosoft/vscode
`NotebookEditorWidget.getEditorMemento` seems unused
Looks like NotebookEditorWidget.getEditorMemento and friends can be removed:
https://github.com/microsoft/vscode/blob/efe0678e96ab93353e11f1656ece4433c6b42e9b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L530-L530
created time in 22 days
issue commentmicrosoft/vscode
Add a setting or always restore the last editor state for editors opening in new groups
Added a new setting workbench.editor.sharedViewState to control this. Not super convinced with the name yet, maybe you have a better idea.
Enabling this setting will:
- always store the last memento that is persisted in a location that is group independent (aka survives group lifecycle)
- will use this memento if not more specific memento in a group is found

From the gif, even though new (unknown) groups are opened, the files that open within get the state that was last persisted.
comment created time in 22 days
push eventmicrosoft/vscode
commit sha 00ae2948c750ce3569182b6d2e31653ee152e20d
rename some "base-xy" to "abstract-xy"
commit sha 4fb7b80bf03297de64a61111acd75805e309b401
Add a setting or always restore the last editor state for editors opening in new groups (fix #102485)
push time in 22 days
issue closedmicrosoft/vscode
Add a setting or always restore the last editor state for editors opening in new groups
While working on https://github.com/microsoft/vscode/issues/101356 I have noticed that EditorMemento has an issue because it stores stated based on group#id and that keeps changing. These steps
- have an editor
- split the editor - it's now in group 2, no memento state found
- close the 2nd editor, state is persisted for group 2
- split again - it's now in group 3, no memento state found
- close the 2nd editor, state is persisted for group 3
- split again - it's now in group 4, no memento state found
- this repeats...
The capture below shows the memento for a notebook that I have opened (split) and closed a few times

closed time in 22 days
jriekenissue closedmicrosoft/vscode
Issue Type: <b>Bug</b>
code --verbose --disable-extensions --disable-gpu --log debug
[main 2021-04-16T10:36:36.230Z] Starting VS Code
[main 2021-04-16T10:36:36.231Z] from: /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app
[main 2021-04-16T10:36:36.231Z] args: {
_: [],
diff: false,
add: false,
goto: false,
'new-window': false,
'reuse-window': false,
wait: false,
help: false,
'list-extensions': false,
'show-versions': false,
version: false,
verbose: true,
log: 'debug',
status: false,
'prof-startup': false,
'prof-v8-extensions': false,
'disable-extensions': true,
'disable-gpu': true,
telemetry: false,
debugRenderer: false,
logExtensionHostCommunication: false,
'skip-release-notes': false,
'disable-telemetry': false,
'disable-updates': false,
'disable-keytar': false,
'disable-crash-reporter': false,
'skip-add-to-recently-opened': false,
'unity-launch': false,
'open-url': false,
'file-write': false,
'file-chmod': false,
'driver-verbose': false,
force: false,
'do-not-sync': false,
trace: false,
'force-user-env': false,
'force-disable-user-env': false,
'open-devtools': false,
__sandbox: false,
'no-proxy-server': false,
nolazy: false,
'force-renderer-accessibility': false,
'ignore-certificate-errors': false,
'allow-insecure-localhost': false,
logsPath: '/Users/fernando/Library/Application Support/Code - Insiders/logs/20210416T113636'
}
[main 2021-04-16T10:36:36.232Z] Deleting Chrome cached data path: /Users/fernando/Library/Application Support/Code - Insiders/Code Cache
[main 2021-04-16T10:36:36.234Z] Resolving machine identifier...
[main 2021-04-16T10:36:36.234Z] Resolved machine identifier: XXX
[main 2021-04-16T10:36:36.240Z] Main->SharedProcess#connect
[main 2021-04-16T10:36:36.289Z] StorageMainService: creating global storage
[main 2021-04-16T10:36:36.289Z] lifecycle (main): phase changed (value: 2)
[main 2021-04-16T10:36:36.290Z] windowsManager#open
[main 2021-04-16T10:36:36.294Z] windowsManager#open pathsToOpen [
{
workspace: { id: 'e91bb1802ef56b82b637ba803fce74d8', configPath: [w] },
remoteAuthority: undefined,
exists: true
},
{
workspace: { id: 'ffa8e3622dfd19347cfa08720515e5ec', configPath: [w] },
remoteAuthority: undefined,
exists: true
},
{
workspace: { id: 'fa1857f5b7983026d5dfecbc58fd7565', configPath: [w] },
remoteAuthority: undefined,
exists: true
},
{
workspace: { id: 'd7eee6391bc262cb48b02619e9664f2d', configPath: [w] },
remoteAuthority: undefined,
exists: true
},
{
workspace: { id: '04e22ae33bae148ef0b141966d5ca94f', configPath: [w] },
remoteAuthority: undefined,
exists: true
},
{
workspace: { id: 'ffa8e3622dfd19347cfa08720515e5ec', configPath: [w] },
remoteAuthority: undefined,
exists: true
}
]
[main 2021-04-16T10:36:36.299Z] IPC Object URL: Registered new channel vscode:93363156-5218-4f59-a3cc-5b9265cebbd3.
[main 2021-04-16T10:36:36.299Z] window#validateWindowState: validating window state on 2 display(s) {
mode: 3,
display: 724857497,
width: 1024,
height: 768,
x: -460,
y: -1440
}
[main 2021-04-16T10:36:36.300Z] window#validateWindowState: restoring fullscreen to previous display
[main 2021-04-16T10:36:36.300Z] window#ctor: using window state { width: 1024, height: 768, mode: 3, x: -460, y: -1440 }
[main 2021-04-16T10:36:36.300Z] window#ctor: vscode-file:// protocol is explicitly disabled
[47733:0416/113636.327915:WARNING:address_sorter_posix.cc(388)] FromSockAddr failed on netmask
[main 2021-04-16T10:36:36.498Z] StorageMainService: creating workspace storage (e91bb1802ef56b82b637ba803fce74d8)
[main 2021-04-16T10:36:36.499Z] IPC Object URL: Registered new channel vscode:90bc356d-af3b-458e-80ca-d80ba0b6612d.
[main 2021-04-16T10:36:36.499Z] window#validateWindowState: validating window state on 2 display(s) { mode: 1, x: -460, y: -1417, width: 1680, height: 971 }
[main 2021-04-16T10:36:36.502Z] window#validateWindowState: multi-monitor working area { x: -460, y: -1417, width: 2560, height: 1417 }
[main 2021-04-16T10:36:36.502Z] window#ctor: using window state { mode: 1, x: -460, y: -1417, width: 1680, height: 971 }
[main 2021-04-16T10:36:36.503Z] window#ctor: vscode-file:// protocol is explicitly disabled
[main 2021-04-16T10:36:36.582Z] StorageMainService: creating workspace storage (ffa8e3622dfd19347cfa08720515e5ec)
[main 2021-04-16T10:36:36.583Z] IPC Object URL: Registered new channel vscode:a39407b6-bf53-4c88-90b9-cb93064c13cd.
[main 2021-04-16T10:36:36.583Z] window#validateWindowState: validating window state on 2 display(s) { mode: 1, x: -460, y: -1417, width: 2560, height: 1417 }
[main 2021-04-16T10:36:36.585Z] window#validateWindowState: multi-monitor working area { x: -460, y: -1417, width: 2560, height: 1417 }
[main 2021-04-16T10:36:36.585Z] window#ctor: using window state { mode: 1, x: -460, y: -1417, width: 2560, height: 1417 }
[main 2021-04-16T10:36:36.585Z] window#ctor: vscode-file:// protocol is explicitly disabled
2021-04-16 11:36:36.660 Electron[47729:225022] *** Assertion failure in -[NSWindowStackController _enterWindow:intoFullScreenWithWindow:], /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1894.60.100/WindowTabs/NSWindowStackController.m:999
[0416/113636.670115:WARNING:process_memory_mac.cc(93)] mach_vm_read(0x7ffee1d78000, 0x2000): (os/kern) invalid address (1)
[0416/113636.825483:WARNING:crash_report_exception_handler.cc(240)] UniversalExceptionRaise: (os/kern) failure (5)
[47741:0416/113636.834680:ERROR:child_thread_impl.cc(222)] Invalid PlatformChannel receive right
VS Code version: Code - Insiders 1.56.0-insider (25785b97e533b15ae3b12e48aaf4187416437e62, 2021-04-15T05:12:50.817Z) OS version: Darwin x64 19.6.0
<details> <summary>System Info</summary>
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (12 x 2600) |
| GPU Status | 2d_canvas: enabled<br>gpu_compositing: enabled<br>metal: disabled_off<br>multiple_raster_threads: enabled_on<br>oop_rasterization: enabled<br>opengl: enabled_on<br>protected_video_decode: unavailable_off<br>rasterization: enabled<br>skia_renderer: disabled_off_ok<br>video_decode: enabled<br>webgl: enabled<br>webgl2: enabled |
| Load (avg) | 1, 2, 5 |
| Memory (System) | 16.00GB (0.13GB free) |
| Process Argv | --user-data-dir /tmp/a /tmp |
| Screen Reader | no |
| VM | 0% |
</details><details><summary>Extensions (33)</summary>
| Extension | Author (truncated) | Version |
|---|---|---|
| vscode-base64 | ada | 0.1.0 |
| markdown-toc | Ala | 1.5.6 |
| inline-hasher | ale | 1.1.0 |
| cform | aws | 0.0.24 |
| spellright | ban | 3.0.56 |
| git-temporal-vscode | bee | 1.0.0 |
| better-toml | bun | 0.3.2 |
| gotemplate | cas | 0.4.0 |
| hadolint | exi | 1.0.2 |
| github-actions | for | 0.0.1 |
| vscode-pull-request-github | Git | 0.25.1 |
| terraform | has | 2.10.0 |
| gitlab-ci-templates | jgs | 0.3.0 |
| markdown-shortcuts | mdi | 0.12.0 |
| azure-pipelines | ms- | 1.183.0 |
| vscode-azureterraform | ms- | 0.3.2 |
| vscode-docker | ms- | 1.12.1 |
| azure-account | ms- | 0.9.8 |
| azurecli | ms- | 0.5.0 |
| github-actions-vscode | Oma | 2.7.0 |
| vscode-yaml-sort | Pas | 4.0.0 |
| errorlens | Phi | 1.1.3 |
| git-file-history | pom | 1.0.1 |
| vscode-yaml | red | 0.18.0 |
| vscode-gitweblinks | red | 2.5.0 |
| code-settings-sync | Sha | 3.4.3 |
| vscode-nginx | sha | 0.6.0 |
| shellcheck | tim | 0.14.0 |
| azure-devops-yaml-pipeline-validator | Tom | 1.7.0 |
| sort-lines | Tyr | 1.9.0 |
| vscode-icons | vsc | 11.4.0 |
| jinja | who | 0.0.8 |
| json | Zai | 2.0.2 |
</details> <!-- generated by issue reporter -->
closed time in 22 days
FernandoMiguelissue commentmicrosoft/vscode
Code closes itself immediately on startup
Please see if you can find any logged output that could help us find the source of the issue:
- run
code --verbosefrom the command line and attach the output - in Code select Help | Toggle Developer Tools and select the Console
- attach any output you see in the Console you can find
Thanks!
comment created time in 22 days
issue commentmicrosoft/vscode
Attach to the same remote session from different devices
/duplicate https://github.com/microsoft/vscode/issues/113996
comment created time in 22 days
pull request commentmicrosoft/vscode
fix #126532 prevent tab's Close button from right-justifying
I will miss this month for being on vacation. Will look into this as part of our issue grooming iteration that is coming up.
comment created time in 22 days
issue openedmicrosoft/vscode
Workspaces: expose `transient` property in workspace context service
Last milestone I introduced transient workspaces (https://code.visualstudio.com/updates/v1_58#_transient-workspaces). The main use case is for LiveShare for guest sessions.
Currently we are not really aware of a workspace being transient in the workbench itself, we only check on the electron-main side. But we have some motivation to understand transient workspaces in the workbench:
- for trusted workspaces (cc @lszomoru)
- for controlling hot exit and backups
I am mainly interested in the latter: I would like to implicitly disable hot exit in transient workspaces because the idea is that transient workspaces never restore and in that case backups should not be accumulated.
Can we have a transient property somewhere here on the IWorkspace object:
https://github.com/microsoft/vscode/blob/ddbc8ae408c817edd4c2bba1a5ed2f9ba8a5de09/src/vs/platform/workspace/common/workspace.ts#L95-L111
Does that make sense or is there maybe another interface that is more specific to multi root workpsaces?
created time in 23 days
issue commentmicrosoft/vscode
@jrieken need your advice here. Internally the file service is using a ternary search tree to figure out when to stop resolving a file tree:
https://github.com/microsoft/vscode/blob/994a6c197b5a15d7b9523cb6dfd17f1dbbcb7772/src/vs/platform/files/common/fileService.ts#L197-L219
The idea is that the explorer would give a set of URIs to resolve to based on which nodes are expanded in the explorer and the file service resolves all stats for all expanded nodes.
This works fine for URIs without query param, but seems to break otherwise. See this test:
test('TernarySearchTree - for URI with query (#128151)', function () {
let trie = TernarySearchTree.forUris<true>();
const uriWithoutQuery = URI.from({ scheme: 'memfs', path: '/large/somefile.txt' });
trie.set(uriWithoutQuery, true);
assert.strictEqual(Boolean(trie.findSuperstr(dirname(uriWithoutQuery))), true);
const uriWithQuery = URI.from({ scheme: 'memfs', path: '/large/somefile.txt', query: 'test=1' });
trie.set(uriWithQuery, true);
assert.strictEqual(Boolean(trie.findSuperstr(dirname(uriWithQuery))), true);
});
If this is intentional, then I will have to change my usage of the ternary search tree to store and search URIs where the query (and possibly fragment too?) parts are set to undefined.
comment created time in 23 days
issue commentmicrosoft/vscode
Reopen Editor With... shows empty editor
Adding Logan, I think there are similar issues for custom editors (Hex) too, maybe needs a unified solution. As discussed, maybe a pragmatic fix is to tell the user to save first via a dialog.
comment created time in 23 days
issue commentmicrosoft/vscode
Enable `contextIsolation` for all windows
Thanks, pushed a fix for that.
We still cannot launch with contextIsolation: true, there are things we depend on that will not work. I wonder if sandbox: true has to happen first because some of these things seem node.js dependent.
enableASARSupport() is only available in node.js environments
Uncaught (in promise) TypeError: require.__$__nodeRequire is not a function
Uncaught TypeError: Cannot read property '__$__isRecorded' of undefined
comment created time in 23 days
push eventmicrosoft/vscode
commit sha ede06d01ec1c1cef48ddd15ff98b68e8ad12cbf0
sandbox - cleanup unused methods and avoid context bridge issue with `process.env` (#128099)
push time in 23 days
issue commentmicrosoft/vscode
Unable to instantiate workbench contribution zt. TypeError: P.onDidChange is not a function
@aeschli yeah sounds good. @olegmushroom fyi on whether Codespaces just missed this or it is intentional.
comment created time in 23 days