No debugger in VS code extension tests - visual-studio-code

I need to debug unit tests for an extension for VS Code but am not able to set any breakpoints. They are skipped all together when running tests, yet work when running the extension in debug mode.
Steps to reproduce:
I cloned https://github.com/microsoft/vscode-extension-samples.
code helloworld-test-example
run npm install and put random breaking points in the test.
When running the extension tests, the breaking points are not having any effect.
before running ext. tests
after running ext. tests
Any help will be appreciated a lot!

This might be an issue with Mac OS. I am able to debug with other IDE's when VS Code is closed. Seems that the second instance of VS Code is the issue when debugging with VS Code.
I replicated these steps on 2 mac OS systems, both with fresh installs and no other activated plugins.

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 run VS Code development environment on Ubuntu

How can I run a development environment of VS Code. I would like to see when I am making any changes to the code. I have followed the VS Code 'How to Contribute' and installed everything on my Ubuntu machine.
I have also run on Docker using the noVNC. I can see the VS Code there but when I try to make any code changes, nothing is happening. Thanks.

Visual Studio code : Issue loading Extensions

I am using visual studio code to do my LWC change and it takes at lest 5 minutes to load those extensions. Some times it fails outright and would not let me run commends.
Is there an option to force run extensions?
There is no option to force run extensions in VSCode. It is likely that your hardware and system configuration is not capable of running your program quickly. Consider editing your question to include your computer specs.
While IntelliJ IDEA does require better hardware than VSCode, consider trying that IDE for LWC instead in case it is a VSCode issue and not your hardware.

vscode on Windows 10: Activating extension ... failed: Module did not self-register

This problem has been brought up a few times and I tried every suggested solution, but nothing helped.
What I have is a native module in a VS code extension. This works very well on Linux + Mac, but I cannot get it to load on Windows 10. Every time the extension is activated and tries to load the native module I get this error. What makes this so strange is that the native module works beautifully in a node session (in a Win command line). I checked what NodeJS version Visual Studio Code uses and installed exactly this version (x86, as vscode is still 32bit). I did an npm install npm -g, ran npm rebuild as well as normal node-gyp rebuild in my extension folder (or node module folder for node-gyp). Every time the module is built fine and works in a node session. Still I cannot get it to work in vscode. So I believe it must be something that has to do with the vscode app on Windows, just don't know what it is. For compilation I tried both VS 2013 and VS 2015.
Interesting here is also how node-gyp compiles the native module on Windows. It appears as if it uses a number of hacks, e.g. the compiled module crashs hard when using std::throw_with_nested (a C++11 feature). Another problem is the win_delay_load_hook.cc file, which contains a hack to make some weird situation work (this init fails on Win 10, so I had to disable that, this is a general DLL init problem not related to the vscode init). So it could well be it's just node-gyp on Win10 which is causing all the trouble. Yet, as I wrote, the native module works nicely in a node session.
What else could I do to find out what exactly is the problem? Is there a log file that shows exactly why the registration is not right? Is there a problem with vscode in general, on Windows 10?

pydev remote debugging blocks when running to completion

I'm following these instructions to remotely debug a python script http://pydev.org/manual_adv_remote_debugger.html
Using breakpoints and stepping work without a problem, but after resuming the script (without any other further breakpoints) the script executes the remaining instructions, and then hangs instead of exiting normally. Even closing the server from pydev does not help, I have to Ctrl+Break the script
I am sure I've done this a while ago with an older eclipse+pydev, and the script resumed and exited normally (and it's very important for me not to mess the rest of the execution).
I've tried this with both Eclipse Luna and Liclipse pydev_4.0.0.201504132356, pydev_4.0.0.201504092214 on Windows 7 x64, same behaviour
Is this an intended behavior or a bug? How could I make pydev let the script end normally?
I can't reproduce this here... please report that as a bug adding details on how to reproduce it (i.e.: ideally, create a project on github and add a step-by-step on how to reproduce it so that it can be fixed... without being able to reproduce it properly, it may be pretty hard to fix).
Also, please give details on the OS and Python version used in the report (https://sw-brainwy.rhcloud.com/tracker/PyDev/)