How can I debug chromium in visual studio 2019? - debugging

Visual studio crashes while building all.sln. I have all the source files. Chrome.exe is also working fine. But, It's been a week, I am not able to build chromium from Visual Studio. It shows this error message.
Unable to start program* allocator_clang_newlib_x64. The system can not find the file specified.

The all.sln is a very big solution with all the Chromium source code as Visual C++ projects. It will make Visual Studio slow even on high end machine. So the recommended way to debug your Chromium fork is via a standalone Visual Studio project. You can follow the steps below:
Open Visual Studio command prompt
Navigate to your Chromium's src folder from that CLI
Open Visual Studio to debug your Chromium executable by typing the following devenv /DEBUGEXE "out\YourBuildFolder\chrome.exe"
Press F5 to start debugging your source code.
Tip: If you want to start debugging by stopping at the entry point, on Solution Explorer pane, right click that project and choose Debug -> Step into new instance from the context menu.
You can use all.sln to edit the source code and yes you have to compile it again for the changes to take effect.

Related

Visual Studio - 2019 Unable to Start Debugging

I am working with Unity.
While in Unity, I build my program. It's a very simple program. It's simply a cube that I placed on the screen.
I clicked build and a Visual Studios Solution was created.
I open up this solution in Visual Studios 2019 and I hit Start (there is no other option besides start).
This is what appears on my screen:
How can I get rid of the error message?
Edit:
I am trying to play with the Hololens emulator.
This post recommended not installing the tools for Unity when installing Visual Studio 2019, that’s why I fid not do so.
Edit #2:
Here is an image from my entire solution from Visual Studio 2019.
Visual Studio solutions can have multiple projects inside of them. Each project generally produces a binary: an .exe, a .dll or a .lib file. If you look at the solution explorer (which you showed in your screenshot), you'll see those projects there. One of the projects will be bolded, and that is the project that is currently set as "Startup project". This is the project that Visual Studio will try to launch when you press F5 or "Start Debugging".
The reason you're getting this error is because your "Startup Project" is configured to be "Il2CppOutputProject". This project builds a .dll, and you cannot start a .dll.
To fix this, right click on "Chapter_2" project and select "Set this project as Startup Project" option. Now starting debugging should start working.

Specflow - going from feature to steps fails

Since some days the feature files are broken.
VS2017:
Colors dissapeard, everything is white.
When I press F12 nothing happens.
When I run the test from solution explorer the tests work fine.
VS2015:
Everything works fine.
What I tried to do:
Option 1: Run Binding Tool
Right-click on the feature file
Select "Run Custom Tool"
This causes the SpecFlowSingleFileGenerator to regenerate the code-behind for your test framework.
Option 2: Restart Visual Studio
Close Visual Studio
Open Visual Studio
Reopen solution
This causes any bindings that haven't been cached to rerun.
Option 3: Clear SpecFlow Step Mapping Cache
Close Visual Studio
Open Windows Explorer
Type %TEMP% in Address Bar and hit Enter
Search for "specflow-stepmap-*.cache"
Delete those files
Open Visual Studio
Reopen solution
Option4: Uninstall and reinstall visual studio 2017
None of them fixes the issues for VS2017.
Some help is more than welcome.
I solved this issue by updating VS2017 to v15.6.1. Prior to that I've tried all the steps you mentioned and it did not work.
Also, found this article: https://github.com/techtalk/SpecFlow/issues/1049 which is saying the same.
These symptoms sound like you haven't installed Specflow extension on your VisualStudio 2017.
What happens when you dont have it is that VS can't work with feature files and can't navigate to anything when pressing F12.
Tests are working because VisualStudio executes already generated NUnit tests from feature.cs files.
Double check your VisualStudio Tools -> Extensions And Updates -> Check in Installed if you have Specflow for Visual Studio 2017 installed and Enabled.
Note: Each time you install a new Visual Studio you have to install the extension.
Came across the same issue, installed Specflow for Visual Studio 2017 from Tools >> Extensions And Updates and found as working fine.
Go the colours for feature file lines back and F12 is working fine.
Thanks.

Visual Studio 2015 Stops Working When Trying To Debug

I have recently been having a problem with my Visual studios 2015 in which it stops working when i try to debug anything. I am able to build and rebuild the solution perfectly fine however when i try to debug it it simply stops working and a loads indefinitely. Also when i try to run the exe directly from the debug folder the windows explorer that i am opening it in does the same as Visual Studios. I have tried this with both complicated program and also just a super simple "Hello World" program. the language i am using is Visual C++. Any help would be appreciated because this is really annoying me.
After openning your VS 2015 and solution project, then if you experience the problem saying 'Visual Studio stopped working, close the program.....'
while you run or build the project that was previously fine; then run the command below in the command prompt
-> Go to command prompt
-> Go to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
-> Then run devenv/resetuserdata
-> Open the VS2015 and give your MS account for starting VS2015 as new instance
-> open your solution, build and debug, then ENJOY :)

Attach to executable with Visual Studio debugger

What I'd really like to do is debug an executable using the Visual Studio debugger. It comes with an Attach to Process feature. Unfortunately, the target executable only lasts for a short period- much too short for me to launch the executable and then navigate through Visual Studio and attach to it. How can I command Visual Studio to launch the executable and immediately attach the debugger?
AttachToLazy VS add-in can wait for a process to start and then attach to it.
This add-in was written for VS2008 and it looks like some people were able to get it to work with 2010 by adjusting some of the properties (info under the Discussions tab).

No templates available when creating a new project in Visual Studio

"No template information found. See the application log in Event Viewer for more details. To open Event Viewer, click Start, click Control Panel, double-click Administrative Tools, and then double-click Event Viewer."
That's the error message I get when I try to create a new project or solution.
How can this be resolved?
I used a solution presented to me from other sites. One of them said to reinstall templates.
I did the following:
In the command prompt I typed: cd C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
Then I typed: devenv /installvstemplates
I took a minute but after it completed I opened Visual Studio and tried to create a new project. All my project templates were back in order, including additional templates like Workflow, SharePoint and Silverlight.
Link to other source
Start Menu --> Microsoft Visual Studio 2008 --> Visual Studio Tools. Right-click over the Visual Studio Command Prompt shortcut and make sure you select Run as Administrator. Once the VS Command Prompt comes up, execute the command without Quot,
"devenv /installvstemplates"
"devenv /resetsettings"
And that worked out.
Run Following command and it will restore templates.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE>devenv /installvstemplates
This may not match the original posters exact symptoms but I was seeing a blank screen after clicking Create a new project (VS 2019). Discovered that the install of Visual Studio had 'finished with errors' (paraphrasing there - now I've fixed the issue I can't see the exact error message) anyhow digging into it I found that the C++ redistributable had not installed (even though I'm a C# dev that's still important to VS!)
If I tried to install this as a standalone I got an Access Denied error (even if running as Administrator). Digging into the VS install logs I found a similar report.
Anyhow after a fair amount of Googling a few responses pointed to Virus software preventing the C++ redistributable from installing (in my case McAfee). Once that was removed a repair of VS resolved the issue :)

Resources