VScode crashed (reason: 'oom', code: '-536870904') - visual-studio-code

I am trying to open a folder that I opened before, but it crashed.
I can open other projects, and restarting the computer didn't help.
Maybe it's because I had a big file opened (400mb) in this folder, but I cant close this file because the vscode crashing every time when I tried open the workspace..
https://github.com/microsoft/vscode/issues/126127
https://github.com/microsoft/vscode/issues/130375

I had the same problem.
Just delete the folders under %appdata%/code/backups/ and restart VS.

I solved the problem by restarting my computer and then opening VS code from a different folder.
To open large JSON files, I use Dadroit JSON Viewer, thus preventing the problem from repeating itself.

Not worry much about that!, same issue occurred in my pc but there is easy steps to fix this error as following.
solution: Enable "paging files" option OR increase virtual memory.
steps:
1). Right click on "ThisPC" or "MyPC" and go to properties. then go to "Advanced System setting". [ you can also find that using SEARCH button ]
2). then click on settings of Performance block. its open another pop-up window in that ,go to the "advanced" option .
3). you can see the Virtual memory section ,in that click on change button.
4). now first disable the checkbox of "Automatically manage paging file size for all drive".
-> and select the "custom size:"
-> in Initial size(MB): { you need to add the same value as recommended, which is also displayed downside section }
-> in Maximum size(MB): you need to enter the value that you get multiply by 3 of your allocated RAM size.
for example:
your pc's ram is 4 gb then you can enter 4098*3= "12288mb".
then set it , click ok, ok, ok, and then just RESTART your pc. 🥹
hope god will help you.

It's easy than you think, you just need to update your laptop. and try to use Vs code again you will see that it works.

Related

Visual Studio Code window is not appearing

I've encountered a very strange bug with Microsoft Visual Studio Code. I've been using VSCode for a few months now and never had this issue. When I open VSCode, the window just doesn't appear. The app is definitely open, because when I hover over the icon on my taskbar I can see what is being displayed in the app:
Unfortunately, when I click on it, the window does not appear.... I've uninstalled and reinstalled, deleted cache, tried older versions and nothing has worked. Has anyone else encountered this and fixed it? Any advice?
hover over VSCode icon in taskbar
right click on it
click on "New Window"
That should do it.
I had something similar. It appears that the window is just off-screen. I've used my DisplayFusion display manager - to move windows to center/top where I could handle it myself. I expect it'll also work using <Win> + <←> (maximize window to left side of screen).
In my case, the issue went away when uninstalling the GlassIt-VSC extension. I tried modifying the opacity of the window and then it disappeared. I highly suggest you try uninstalling this extension.
In my case I had connected HDMI cable but due to power off my monitor was off, but when I disconnected hdmi cable; VS code visible on my screen.
Got the answer since no one was helping.
Go to view.
Click solution explorer.
It should show the name of your project.
Click the small arrow at the beginning of the heading of your project.
Click source files.
Click yourproject.cpp.
Thank you.
I encountered a similar issue with a plugin called GlassIt while I was playing with a property called "glassit.alpha" somehow it went to 1 (possibly I changed it accidentally) and nothing showed up. (here's an image where you can slightly see that I set alpha to 20)
what i did was to just edit the %appdata%\..\Roaming\Code\User\Settings.json and set "glassit.alpha": 1, to 255
UPDATE I just realised there was already an answer I didn't see while I was writing this post
I had this issue during a remote desktop session and could bring the VSC window back via hitting F11 (via the onscreen keyboard in my case, since the F11 key on my keyboard was being captured by the host system).
In my case, I have a dual monitor setup, and the laptop was in clamshell mode. However, the laptop's built-in monitor was recognized as a third monitor, and VsCode was going there.

Chrome Devtools Workspace 2.0 loses syncing with CSS files after reload

I have added the local folder into the "Filesystem" tab of the Workspace. I see the CSS file I need to edit with the green badge (the linked icon) as shown on the screenshot below. As I make the changes, I see them being reflected on the page. However, as soon as I refresh the page, the linking just disappear just for the file I have edited. But as soon as I upload the file to the server, then the linking starts working until another refresh.
Am I missing something? Is there a setting that I need to do?
Chrome was not able to store persistent changes on version 63. They have introduced something called overrides with version 64.
Figured this frustrating thing out as an annoying side effect is that once you loose the mapping breakpoints stop working and the only solution was to reloading Chrome.
It appears sync is lost when using multiple Chrome DevTools trick as per here: https://stackoverflow.com/a/55507080/913223 .
The work around is to re-open the file using CTRL+P command palette. Notice in the screenshot below the file is duplicated, opening the virtual one re-connects mapping and brings back the green icon.

Visual Studio Code - Tabs (editors) of the same project in multiple screens

Using multiple screens I normally place multiple classes (files) in different screens, this helps me a lot while refactoring, checking tests and comparing changes.
Visual Studio Code does not allow me to drag a tab outside the window and view it in (for example) another monitor.
I checked the documentation and plugins, but the only way I found, is to open two windows, pointing to the same project (folder) and put those in different screens.
I don't like this solution, that causes also some problem when I watch code changes using TypeScript.
Any suggestion?
I use Windows 10, latest version of VSCode.
A solution is to press CTRL+K and after releasing CTRL, press O.
This will open the current file in a new window.
There are few things I don't like about this solution:
- Drag and Drop does not work
- Create a new instance of VS Code resulting in (for me) 180MB of ram used
- To open the file it takes to me few seconds (quite slow)
- The file remains open in the original window as well
Update 20/03/2019:
There is a feature request you can track here:
https://github.com/Microsoft/vscode/issues/10121
And an explanation about why this is difficult to implement here:
https://github.com/Microsoft/vscode/issues/10121#issuecomment-345770248
Update 20/03/2019:
Another important side effect highlighted by #Mär is that:
the IntelliSense fails to establish references it had when the file
was opened in the window, where the entire project is opened
The easy way but with the same drawbacks. More ram and resources will be used. Is to wrap your project in a folder.
It's the best possible thing. As by now!
=> Duplicate the workspace.
Open the command pannel ctrl+shift+p or F1.
Then write dupl
You'll get that
That's it.
More
If you want to add more folder to the working space.
=> go to File then Add Folder To Workspace
You can add as many as you like.
 Also better more
You can open a new window (ex: ctrl+n)
And then go File > Add Folder To Workspace.
And start adding folders to your new Workspace. You can add any folder, that is already open or not. That's too way great. You can have all the needed folders for example in the second screen.
A little hack I used is to just stretch the editor window to fill both screens and split the view pane between the monitors such that both screens show just one open file.
This is a cheap hack that works without opening multiple instances of VSC.
It may not be the proper solution, but it works without eating up all my system memory.
I found the following way to work on multiple monitors (important: they must be the same size and resolution):
open a visual studio in windowed mode on the 1st monitor (in my case it is a left monitor)
move the window to the (left) top corner
stretch window to the 2nd monitor (right) bottom corner
split screen by clicking “split editor” several times
move the code sections separator to the edge between the monitors
This is old qestion, but such way can be useful for someone. It is not very convenient, but it works. The solution may have already appeared in the VS itself, but I didn't find it.
Visual Studio Code does not allow me to drag a tab outside the window and view it in (for example) another monitor
Actually, VSCode 1.57 (May 2021, 4 years later) will propose something close:
Improved editor drag and drop across windows
Support for dragging editors to other windows was improved in this release. You can now drag diff editors, custom editors and the entire editor group to another window to open the editors there.
My solution was to use Remote-ssh to connect to self and open in another window. This does take extra resources. But I find this comfortable as I don't need to create additional workspace.
For me on Ubuntu the solution was to create a project folder symlink and ope it in a new window (as it won't open the same folder in another window)

Eclipse PDT, XDebug Variable Watch Details only shows 1000 characters

I am debugging using Eclipse PDT with XAMPP
This question is related to this item:
Variables viewer on Eclipse debugging truncates the string values
I am having the same problem as in that link.
I watch a variable and in the Expresssions tab, I can only view about 1000 characters in the "details" window.
If I right click and use 'copy expressions' I get the same 1000 chars.
I have also right clicked the details pane... Max Length and tried setting it to 0 or 30000 (my data is about 20k) and neither changed the max of 1000.
This defeats the whole purpose of me spending 2 days to get Eclipse setup for debugging... If there is no workaround for this, can anyone suggest a PHP debugger that will not have this limitation?
I was going to try the Zend debugger, but saw a video that suggested it uses the same exact Expresssion/Detail pane to show its data... can anyone confirm/deny this?
Thanks!
In the Variables view you right-click on the variable and select Change value. If your variable is huge you have to wait a few minutes (in this case Eclipse doesn't respond to commands) but in the end Eclipse will show your variable entirely.
I tried just about everything imaginable... I believe this is a bug in Eclipse that should be fixed, but anyway, I finally just create a new test case that eliminates me needing to debug a 20k piece of data...
There isn't an option to set no limit but it is possible to increase the limit within the XDebug config.
Within Eclipse go to
Window -> Preferences -> PHP -> Debug -> Installed Debuggers.
Highlight XDebug and click Configure.
Within the window that pops up you can see the array depth
and the max children. Setting those values higher will give you more
data back about your variables.
source

Eclipse (3.4): how to get Problems to appear automatically if one has errors?

When I build my projects in FlexBuilder, I want to see any errors immediately; I don't want to have to hover or open the Problem pane every time, nor do I want to always leave it open.
Any ideas?
I do not think this is a problem.
As far as I know the Eclipse settings and there is no such.
You can use shortcut keys SHIFT+ALT+Q and press X to fast open the problem panel.