Setting up a terminal in VS code [duplicate] - node.js

This question already has answers here:
Changing the default path of Visual Studio Code's integrated terminal
(6 answers)
Closed last month.
Whenever I try to to open the terminal in VS code the following message pops up. I am a newbie and I am not able to understand all of this
I was trying to configure the auto reload upon saving via node.js and my course showed that I might be able to do this via VS code terminal
The error message when trying to open the VS code terminal

You can first re-install your VS code to remove this error and then go to terminal integration settings and select node.js there.

Related

An error occurred attempting to determine the process id of dotnet.exe which is hosting your application.A task was canceled

When I try to startup my project w/ IIS Express I get the error:
enter image description here
VS 2017
Project Properties
Debug
Launch Browser //http://localhost:5000 or whatever
Uncheck Enable SSL
App Url //http://localhost:5000 or whatever. make sure same with Launch Browser url
Save and Close
Open launchsettings.Json under Properties (Solution Explorer)
Make sure old settings is deleted. If not delete it.
Save and Close.
Hope it helps
I encountered this error when trying to launch a downloaded project in which the target framework version was different from the version installed in my environment. I opened the “.csproj” file in a text editor, corrected the version in the “TargetFramework” node and saved the modified file. In order to be sure to make the changes take effect, I closed and reopened the Visual Studio solution containing the project. Then the project started correctly.

VS2017 debugging on remote Linux - view strings

I'm using Visual Studio 2017 to develop a C++ app on a remote Linux machine. First, I run my code on the remote machine and then attach to the remote process using SSH. I attach to Native (GDB) code and hit my breakpoint. The problem is that I can't view the contents of a string received in the debugger.
std::string msg_str(static_cast<char*>(incoming.data()), incoming.size());
The string above is retrieved via ZeroMQ message. If I do a QuickWatch on msg_str, none of the values are in a human readable form.
What I expect to see is:
{"message":"mark","color":"#FFAABB","session_id":"XVg32B","x":34,"y":563}
What do I need to do in order to view this in the VS2017 debugger?
edit
No I'm not compiling with VS. I'm developing a game using the Urho3D engine. On the Linux box I use cmake to create the makefile and then compile/link using make from a SSH bash shell. In VS I get all kinds of build errors.
I've been searching high and low for more information on how to set this project up, to no avail. My biggest problem is that I'm a C# developer trying to come up to speed with C++. The learning curve is pretty steep...
I think the problem is that you've attached to the remote process and VS doesn't know that it's supposed to be looking at a std::string. Are you able to run your test by building then executing from within VS? Does VS know that the source it can see is what's running in the debugger?
It looks like at least some of the string is visible in QuickWatch as _M_p. The result you expect doesn't appear to be a simple string, could this have a bearing?
I just tried inspecting std::string ss ("12345", 5) in QuickWatch in VS2017 (15.7.3) and the string is displayed exactly as you would expect. But I did compile and run (F5) from VS.
========= 18 June
You can create a makefile project in VCLinux very easily. Add a new project to your solution and choose Visual C++ - Cross Platform - Linux - Makefile Project. Then copy your sources and makefile into the newly created project directory and add them to the VS project. In the project settings, set the Remote Build commands, e.g. cd $(RemoteProjectDir);make debug and under Debugging set the remote command you want executed.
Depending on how complex your project is, it might be worth creating a very simple, stand-alone test to try out remote building and debugging to verify that you can set a breakpoint and correctly visualise a string.
Not the perfect solution, but I do msg_str.c_str() in the immediate window. Probably wouldn't work well for anything beyond the 7bit ascii subset of utf.

Disable node.js app debugging in Visual Studio Code (vscode)

I am working on this node.js application using Visual Studio Code IDE. Everytime I run this application, it is attaching a debugger (which takes around 2-5 seconds) and then executing the application.
So, my issue is everytime if I modify some code (or a simple variable name) and execute the program, it takes this much time to see the output even though I haven't set any breakpoints.
Need help in disabling the debugger in Visual Studio Code IDE for node applications development. I can't find anything helpful on net :( .
There is workbench.action.debug.run which is bound to cmd+f5 / ctrl+f5 by default.
You can find it in the command palette under the name "Debug: Start without Debugging"
Inside the VsCode terminal, I've switched the terminal to zsh instead of the JS Debug Console and it fixed it:
Screenshot of the terminal's dropdown
You can just switch from "Javascript Debug Terminal" to "powershell" (command terminal). it doesn't attach the debugger again
consider passing the option below on settings.json
"debug.javascript.autoAttachFilter": "onlyWithFlag"
with this option, you will always need to pass ---inspect option to start debugging mode. otherwise, it will always start normal running mode.

Microsoft Management Console has stopped working

I'm trying to add snap into Microsoft Management Console in windows 10. But when I try to add certificate, an error message is coming with the header Microsoft Management Console has stopped working:
When I click the Debug button, Visual Studio 2015 gives me a message like this:
I've tried a solution found by google search saying to run sfc/scannow command in command promt but didn't get any result.
So this doesn't address the error itself, but if you were trying to use the snap-in to access the local computer certificate store then there is a work around.
Open up command prompt and type in 'certlm.msc', this should directly open up the local computer certificate store plug-in without having to go through the buggy menus.

Visual Studio deployment error

"The application could not be launched for debugging. Please make sure the device is unlocked."
I am getting this error when I try to launch the app on my device for debugging.
I have tried the following:
Relaunch Visual Studio,
Reinstall Visual Studio,
Restart my computer,
I have selected both debug and release in the configuration window.
The problem is that its not getting launched even in the emulator. The emulator opens and never loads the app but gives the same error message. And I have tried to just open a new application on VS and tried to run the default application. That also gives the same problem.
Everything was working fine after I opened a few more projects for reference, It suddenly started giving this error message.
Make sure a Windows project is not set as startup(assuming you have both windoes project and phone project in the same solution). For example If your target platfrom is a Windows phone project WP7, then you cannot have a windows project as startup. This is a known reason for the error you mentioned.
Also what is the operating system you are working with? I know the error you mentioned reprorted on some OS's including Windows server 2003 and 2008. Try running your project in winsdows 7.
I suddenly got exactly the same issue today. I was coding like always and then I got this problem.
// P.S.
// Today I updated Windows from 8 to 8.1
// Then I installed VS 2013 preview
// But continued working in VS 2012 (I need R#)
// After ~ 5 hours of work I got this issue
I tried everything, deleted emulators from Hyper-V, deleted all virtual commutators, restarted VS 2012, restarted laptop, deleted Bin and obj folders from project, rebuilded project.
But nothing helped.
Then I tried to open solution in VS 2013 preview, and it works!!
I hope I help you with this answer.
If somebody know how to fix it in VS 2012, please tell us
I have a similar problem but I’m able to debug my app once I click OK on the error prompt following the “Launching TaskHost.exe failed.” message in the status bar. I haven’t been able to solve it but I’ve found a workaround that might also work for you.
Start the “Simulation Dashboard” under “Tools” and instead of starting the debugger the usual way build your project if needed and then try to start the debugger by clicking “Locked” under “Lock Screen” on the dashboard.
This answer worked for me.
Under the following:
Solution(Right-click) > Properties > Configuration Properties > Configuration
Ensure that your main project is set to 'Deploy.'

Resources