After building my solution in Visual Studio 2017 I noticed that the Start (Run) button is replaced by "Local Windows Debugger". How do I get the Start button back?
NOTE: I have already tried the solution that suggests checking the settings under Tools->Customize, and I've also tried Tool->Export and Import Settings->Reset All
Related
I have a strange issue with a projects that I am trying to start from Visual Studio 2017 - project's exe file is getting blocked by Bit9. And it happens only with Visual Studio 2017, and the same is working with VS 2015.
What I can see from Bit9 screen is that msvsmon.exe is trying to run MyProject.exe and it gets blocked. I guess this is some setting on visual studio side but I cannot figure out what to change.
I looked on the internet and I checked Debug tab of the project, and Use remote machine was already deselected.
I have downloaded RDLC extension from visual studio 2017 Tools -> "Extensions & Updates" successfully & its showing me message as
"This extension is scheduled for install".
So I have restarted my VS2017 (VS Professional 2017 version 15.8.6 ) but still its showing same message & it seems RDLC extension is still not added in VS2017.
I also closed VS using both menu and the close window button (X) in VS but still no luck.
I found the solution. There was another VS instance was running.
I closed all my running VS instances & then "VSIX Installer" installed all my extension.
Try, File -> Close instead closing VS by clicking X
Or else, restarting the PC should work according to the warning shown in the window
Or else, You can change your settings
Even though you close your visual studio instances, there may be another instance running in background. So make sure you closed all instances in Task manager -> Details.
In my case it started to install once i closed all instances.
If you have opened visual studio account window in browser close it & also close your VS. After it VSIX installer will install the extension for you.
For me I restarted my PC/VM and then installed the extension from Visual Studio again. Then I have closed the extension window. Again opened the extension window. And then closed extension window and Visual Studio. Then after couple of seconds a "VSIX installer" window appeared an started to install the extension automatically.
Visual Studio 2017 has built-in support for cmake projects, meaning you can just open a folder containing a CMakeLists.txt and use it. However, there doesn't seem to be a way to prevent the console window from closing after running an executable.
With a normal Visual Studio project, you can use Ctrl+F5 to run without the debugger attached. However, Ctrl+F5 did exactly the same thing as F5, that is, it ran the executable and closed the console window immediately.
Another suggestion was to set the subsystem to "console" for the application, but the cmake project has no Visual Studio project that I can set settings for.
I figured maybe I could go to the Debug and Launch Settings for my CMakeLists.txt (right click > Debug and Launch Settings > target.exe), which opened launch.vs.json. Unfortunately, I was unable to find documentation on this. By looking through the schema, though, it seemed as if I could set "noDebug": true, but this just turned off the debugger and did nothing to stop the console from closing:
{
"version": "0.2.1",
"defaults": {},
"configurations": [
{
"type": "default",
"project": "CMakeLists.txt",
"projectTarget": "target.exe",
"name": "target.exe",
"noDebug": true
}
]
}
This is driving my crazy. I can't just add a system("pause") to the main function, as I'm using a main function provided by a test framework. Furthermore, that should be completely unnecessary; Visual Studio should handle it for me.
How can I make the Visual Studio console not close after my executable finished, when my executable is from a cmake project?
I'm using Microsoft Visual Studio Community 2017, Version 15.2 (26430.16) Release
It's a bug in Visual Studio 2017 CMake support. It is resolved in VS 2019.
As a temporary workaround, add a breakpoint on application exit and run with debugging on (F5):
Press Ctrl+B (New Breakpoint)
Enter function name: exit
Press OK
Now if you run your project (F5) the debugger will stop after main() returns.
To remove the breakpoint, go to the Breakpoints View (Ctrl+Alt+B) and delete it from there.
Came across this situation lately, because we sometimes use stdout for debugging info in our UI applications, we needed to turn on the console window on our dev-machines, but turn it of in our CI build.
In your CMakeLists.txt must be a 'add_executable' statement, like this:
add_executable(project_name WIN32 ${your_source_files})
If you ommit the WIN32, CMake will change the subsystem to "Console", which leads Visual Studio to keep the console window open when your application exits.
I'm trying to build and run a simple project in Visual Studio 2017 (C++) in x64 using the Local Windows Debugger. However every time I try to run it using the debugger I get this error.
This error doesn't show up when I change it from x64 to x86, but I need it to compile to x64. This has happened on both computers that I've tried it on, and seems to happen in every one of my projects. I've tried reinstalling Visual Studio already and nothing's changed. I've tried adding 'devenv.exe' as an exception to the Windows Firewall but no changes there either, even when I disabled the firewall completely. My antivirus isn't affecting it at all either: still happens when I disable it.
The application runs fine when I find it in the explorer and run it manually but then I don't have any debugging tools.
What am I doing wrong here, how do I make it build and run my project as x64?
I get this error every time I have an active VPN connection. If you use a VPN, try disconnect and see if the error disappears.
If you want to use a VPN, the solution (assuming you have Visual Studio 2017 Version 15.7 or later) is as follows:
Go to the Windows Start Menu and launch the “Developer Command Prompt for VS 2017 Preview”
Run: "%DevEnvDir%vsregedit.exe" set "%VSINSTALLDIR:~0,-1%" HKCU Debugger UseAnonymousPipes dword 1
Restart VS if it is already running
That solution is from this link to Microsoft.
I have this C++ project I am trying to debug in Visual Studio (Community) 2015. The build is always successful, but after that debugging never starts. All that shows up is the Windows loading icon, which just never goes away. Any ideas about what might be wrong?
The problem was that Avast was interfering with my Visual Studio Projects. I used the instructions at https://forum.avast.com/index.php?topic=139935.0 to get it to work.
Basically you need to exclude your VS projects from Avast's scan.
... but simply turning off DeepScreen in Avast 2014 is not enough. I
make multiple apps in Visual STudio 2012, and I can tell you that even
with Deep Screen off, Avast will still pop right up and destroy the
compiling process by saying the .exe is a virus (the crazy "evo-gen
[susp]"). The only way I can get Avast to stop doing that is to
manually enter-in exclusion directories for every directory where I
create apps! ...or make an exclusion for some high-level folder.
Try resetting your settings by going here
Tools >> Import and Export Settings Wizard >> Reset all settings
I had similar problems for Visual Studio 2015 Update 1 on Windows 10.
For me, the only solution, which helped is to install this package:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=49029
"FIX: Devenv.com process freezes after you execute devenv.com /build command in Visual Studio 2015 " https://support.microsoft.com/en-us/kb/3092422