I'm writing c++ application in VS code. I've already configured launch.json and I saved it. After reopening VS code, launch.json resets to some "default" configuration. Why and how can I prevent this?
Related
Currently, I am working on cloning the Cilantro github repository. I did using Cmake and also downloaded the required dependencies. The issue is I cannot run any files inside the project as well as newly created .cpp files for testing.
When I build the project it does builds successfully. but Whenever, I try to run by clicking in Local windows debugger I keep getting error unable to start program access denied.
snapshot of my current error
Things, I have done but not helped
uninstall MC*** antivirus
disabled the Real-time protection in systems virus security
rebuild the project and it build successfully
snapshot successfull Rebuild
also tried making cilantro as my set as project but than I am getting following error.
cilantro, set as project
I need help to run the project and remove the following error. Also,is there an easier way to clone and run the project in visual studios without using CMAKE GUI?
IDE: Visual Studios; Trying to run C++ program
Used CMAKE gui to build this project Cilantro
Github which I am trying to run is : https://github.com/kzampog/cilantro
make you project as set as startup project
Solution Explorer > cilantro (Right click) > set as startup project
official doc
I deployed my MVC project to IIS and now I need to debug code by attach process but it not work.
These are steps that I did to debug:
Run my solution with Visual Studio Pro 2017 as Admin
Debug -> Attach to process...
Attach w3wp.exe process
Restart my site in IIS Manager
Run my site in browsers to debug
After above steps, my breakpoints always warning:
The breakpoint will not current be hit. No symbols have been loaded
for this document.
I can debug my code in the other PC with above steps but this way have problem with my laptop.
How can I fix this?
Thanks all.
I resolved my problem by:
Debug -> Options...
Uncheck at "Enable Just My Code"
I installed the newest Visual Studio Professional 2017 (15.8.5) to my laptop. In this version, above option is checked as default.
I recently created a c++ program for windows that when is launched, it reads some files that store the user configurations, if it is the first time the program runs, it store the options the user set and create the files. When I am debugging it in visual studio it works as expected.
So I proceded to create a setup for installation, I used Inno Setup. My program requiered to start at launch so I use the following code, this is from the inno website http://www.jrsoftware.org/iskb.php?startwithwindows. My problem is that when the programs start at launch these files are not read or created, but if I close the program and I launch the program using the desktop Icon it reads and creates de files.
So my question is there something in the Inno script that allows it to read the files? could be a problem with the fstream class?, could there be a code solution
Thanks in advance.
I followed Michael advice and I used the APPDATA folder with Roaming subfolder, and now the program read the config files and run as expected, thanks for the help!!.
From above comments, you say you are storing the configuration files in the same folder as the .exe, and your application is able to create the files when run from Visual Studio, but not when installed to the "Program Files (x86)" folder or C:/ root.
It sounds like you are running into UAC (User Access Control) permissions issues. The "Program Files (x86)" folder at least, and I believe C:/ (root) as well, require administrator privileges to write. This was not the case with Windows XP and older; it is with modern versions. You may be running Visual Studio as administrator and not know it, and allowing administrator privileges when you install, but the application is not then run as administrator so it cannot write to those locations.
Try running your (installed) application as administrator (right-click the file and select "Run as administrator"). If it works, there you go: you either have to run it as administrator always if you want it to be able to store configuration files in the same directory as the .exe, or else (much better solution) store your configuration files in an appropriately-named subdirectory of %APPDATA%, which the user running your application will always be able to write to without administrator privileges.
I'm trying to set up remote debugging on Visual studio 2013.
I think I installed everything on my computer and the hyper-v machine too + updated.
So whats happening:
I open a microsoft UMDF driver sample. (I can build it without any errors).
I select Debugging tools for windows remote debugger.
Then a message box pops up named Deployment not configured.
I select I know what I'm doing continue debugging.
Then the Computer configuration wizard starts add new computer.
I select provision computer and automatically configure debuggers.
Then the configuration process configure my hyper-v machine fine.
Installs the necessary files restart the computer and log in with the name WDKRemoteUser.
Then I Click Finish then this error pop-up.
The required property 'DbgengRemoteCommand' is missing or empty. (OK)
So I need to fill up the package property pages->configuration properties->debugging->
Remote Command, Remote Command Arguments, Remote Working Directory, Remote Computer name manually?
And if I had to what should I write there or I miss something else?
You only need to specify the "Remote Working Directory" parameter and you can just give it the same path as your build directory and you should be good.
I have setup my environment based on this video steps:
https://www.youtube.com/watch?v=2LI1IrRp_0w
It helped me to run the app on the device but I cannot debug it. Now I want to be able to debug the test project. By saying debug I mean to placing breakpoints, run application of device and see that it stops on breakpoints. Also I want to see the stacktrace. How I can do this? What eclipse setting I need to configure?