Eclipse not noticing changes to eclipse.ini? - eclipse

I have had a problem lately with jvisualvm not allowing me to take heap dumps and showing very little information at all. I believe this is my problem.
I made the suggested changes to eclipse.ini. It currently looks like this:
The line in question here is then line 19.
Now, when I check the configuration in Eclipse, the new option doesn't show up.
I have restarted Eclipse twice, both via File -> Restart and closing and re-opening, with no effect. Also, I have changed the order of the options in the file, with no effect.
What might cause this and can this be fixed somehow?
EDIT: I also tried closing Notepad++ and then restarting. No effect. type in the command prompt still shows the changes, so they are there.

I managed to solve it by running Eclipse in clean mode, as described here.
I ran Eclipse from the command prompt:
C:\Program Files (x86)\Eclipse>eclipse -clean
This can be done in other ways also, as seen the answer linked above.
At this point, the problem is solved. The rest of the steps are what happened.
I had to choose my workspace again, as the cache had been cleared.
Package Explorer failed to load.
After one more restart, everything worked fine.

Related

Elixir: VS Code ExUnit cannot find Mix

I cannot load or run my tests, from within VS Code.
I'm a new user to Elixir, and to VS Code. I'm running Lubuntu 21.10 (Impish). I've downloaded Erlang/OTP 25 (.deb), and Elixir 1.14 (precompiled binary in /usr/share/elixir), and can get anything I need running in a Bash terminal. Again, in a standard QTerminal window,
erl, iex, mix, elixir, etc. all work fine.
In VS Code, however, I get some errors. I feel stupid, but I'm coming from Sublime Text, so please forgive me.
In the left pane of VS Code, ExUnit shows an error (red):
Clicking on this error gives me this, on the bottom right pane. The command line options, passed to mix test, seem to be the default configuration:
This result is bizarre to me, because I can open the integrated terminal, execute /bin/sh, and then run the exact mix test line that's displayed:
/usr/share/elixir/bin has been added to my PATH variable, in ~/.bashrc, ~/.profile, and /etc/environment.
However, I am further confused by all tests being excluded, and wonder if there's some connection to the core issue:
Note that I can run my tests just fine, using different command line options. I've tried adding tags, but that didn't fix the problem.
I tried Google'ing this, and played around with my settings. Here is what I have configured in the "User" settings.json, and I made sure nothing overrides this in "Workspace" settings:
Changing the useNativeTesting setting doesn't solve the problem.
On another (?) note, I get a "failed to run elixir" upon VS Code startup:
Again, I have no problem running commands from a Linux terminal, or from a terminal within VS Code.
Plot twist: If I remove the precompiled Elixir 1.14, and downgrade to an older version, via apt, the problem goes away. But Lubuntu 21.10 doesn't offer Elixir 1.14, and I'm really into using the new dbg() feature.
But for now, I cannot load or run my tests, from within VS Code, apparently because Mix cannot be found.
Thanks to Daniel Imms, from the VS Code team, for answering my question on Twitter:
"Try moving where ever you init mix and elixir (.bashrc?) into your .bash_profile and then logging out and in again or restarting. I'm guessing it's in your bashrc which doesn't run in non-interactive sessions like in tasks."

How To Fix VSCode: Exception has occurred: ReferenceError: closeDescriptionPopup is not defined

Not sure how this problem specifically occurred. I've been doing some googling trying to narrow down what exactly is going wrong as my project was fine a few days ago. When i attempt to debug my VSCODE project i'm presented with this error.
this is a picture of my launch.json file:
Also, this an error if it helps displayed in the debug console.
Things i've tried so far,
Rebooting the computer
Uninstalling and Reinstalling VSCODE as well as disabling extensions
Creating a new VSCODE Project to attempt to debug
Deleting the launch.json file and creating a new one
just delete the launch.json file and it will work again
After spending some time debugging I solved this problem by simply installing npm packages, I executed command npm i
Just make sure that your npm packages are all installed and none is failing.
Hopefully this helps you or someone with the same issue.
I've solve this problem.
Remove the launch.json file and do not replace it.
Just try to build with F5 button.
Start Debugging from within VSCode
run npm start from a separate terminal and wait for the server to start
refresh the page in your browser
My intuition is that this would create 2 instances of the server binding to the same port and cause a bunch of problems. I'm not sure why, but in my case it worked as expected and let me debug with breakpoints normally.
You don’t need to use the VS Code run button with Live Server. You just right-click the HTML file in explorer and use the menu option “Open with Live Server”.

Change to case in folders are not reflected in intellisense

When I rename folders in VSCode intellisense gets confused. Is there a way to reset intellisense?
If you run the Reload Window command from the VS Command Palette it will restart the analysis server, which will reanalyse and should fix things up.
However, this seems like a nasty bug. Would you mind running the Dart: Capture Logs command, reproducing the issue and then opening an issue on GitHub with the log (please review it for anything sensitive) and detailed steps so we can investigate?

VSCode Powershell integrated terminal hangs when starting

I am using VSCode version 1.12.2 in Windows 10 x64 build 16193. I am trying to debug Powershell in VSCode, but I cannot get the PowerShell Integrated Terminal working. Every time I started the terminal, here's what I see:
And then it hangs in that stage. I can still debug, start, step in, step out..., but I cannot view my variable or run any expression.
My VSCode is using powershell x64 here:
"terminal.integrated.shell.windows": "C:\\WINDOWS\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"
So this is a known issue with this version of windows 10. Workaround here: https://github.com/PowerShell/vscode-powershell/issues/742
It's possible it's getting stuck on something while loading your profile(s). Try adding this to your settings to skip this:
"powershell.enableProfileLoading": false
I have had a similar problem, it seems. I cannot be sure it is the same, but when I would "load a file with VSCode" (user installer confirmed, system installer unconfirmed), it would hang. The following avenues tested:
Double-clicking on a PS1 file (the association to Code being made)
Starting VsCode empty and then loading the file
Starting VsCode from the command-line with a file-designation parameter
Using the --verbose switch, I got a listing which lead me to believe that VsCode seemed to be checking on updates using NPM (I could be wrong here).
Whatever the underlying problem, I did a lot of prodding and probing, and the cure I found was this.
Delete the directory called C:\Users\YourUserId\.vscode.
This directory is rather large, is not wiped by software removal, and may be corrupted apparently. After deleting it, the problem disappeared.

No Java console output in Eclipse; works with PyDev

I have both a Java and a PyDev project in one workspace. When I run the PyDev project (either the main script with Run > Run As > Python Run or its associated unit test with Python unit-test), the console output looks fine. However, when I switch to the Java project, open the main class, make sure the cursor focus is in the main class, and run it with Run > Run as > [my run config], no output shows up in the console, stdout or stderr. I've tried with Run/Debug > Console > Fixed width console checked and unchecked, similarly for Limit console output. "Allocate console" is check in [my run config].
I have tried redirecting output to a file in my run configuration, but the log file is empty after a run; thus, I suspect stdout/stderr are being trapped somewhere. I suspect that it is PyDev causing the issue because when I run the Java project, this exception reliably shows up about 6 times in the error log:
Launch shortcut 'org.python.pydev.debug.ui.launchShortcut.python.unittest' enablement expression caused exception. Shortcut was removed.
stacktrace:
org.eclipse.core.runtime.CoreException: No property tester contributes a property org.python.pydev.debug.ui.python_type to type class org.eclipse.ui.part.FileEditorInput
at org.eclipse.core.internal.expressions.TypeExtensionManager.getProperty(TypeExtensionManager.java:123)
at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:96)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateOr(CompositeExpression.java:68)
at org.eclipse.core.internal.expressions.OrExpression.evaluate(OrExpression.java:21)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:29)
(... and so on)
Additionally, printing from a Java program in a different workspace that only has Java projects works fine.
I tried uninstalling PyDev and restarting Eclipse, but I'm still having the same issue. I still have those errors after reinstalling PyDev, too.
Has anyone run into this issue before, or know of a way to fix it?
Well, I feel like an idiot; turns out, I had redirected stdout/err to a log file that I had long since forgotten about, and stuck somewhere difficult to find.
I ran into the same problem so I did some research. Seems like there was an old issue (2006-2008), but it was resolved by adding an option to the launch configurations to allocate a console. This is available from the Run -> Debug Configurations menu option, Common tab. Perhaps this is simply unchecked after the PyDev install?
If this is a new bug, there were two possible workarounds suggested:
Set up debug launch configuration that uses remote debugging instead of local debugging.
Use a buffered writer to System.out.
Here are the threads for reference:
Eclipse bug - https://bugs.eclipse.org/bugs/show_bug.cgi?id=122429
Workaround thread - java.io.Console support in Eclipse IDE