Setting a Visual C++ breakpoint at a given file and line number - debugging

I know I want a breakpoint at foo.c:234 in a library that my app is using. I can input breakpoints by typing in a function name on the Breakpoints window: New-->Function Breakpoint... . I know I could hunt for the file, open it, scroll to the line, and click it. But I just want to type the foo.c:234 I already know.
It seems like a trivial ask but ten minutes on Google isn't finding it!
I'm using Microsoft Visual Studio Community 2022 on Windows 11.

Related

Why does the Visual Studio 2013 console window always close right after I run a program?

Every time I run a program in Visual Studio 2013 it closes the console window directly after it asks for any more input from the user for the last time it's told to. I have put return 0; at the end of it, but that too doesn't fix it. And yes, I always run it with the StartWithoutDebugging option (ctrl + F5) as many people have resolved it with.
I've searched high and low for an answer on this webiste but with no avail. Any answers it seems that anyone gives is for a different IDE or I have already implemented it.

Prevent to start "Debugger-Windows" from first application start in Visual Studio

When I start a program from Visual Studio it also starts several (about 6) additional windows I guess they show some resource information.
My problem is that those windows seems to freeze the whole progam. I cannot close them and have to restart Visual Studio. Is there a way to prevent them to open when I start a application from Visual Studio?
EDIT(Screenshot added):
EDIT: After a downvote without a comment, it looks like i have to add my affords:
Googled over an hour, but because those boxes crashes I dont see what they are supose to be. So I dont know for sure what to look for.
Enabled and dissabled all Debbuging option without any effect.
EDIT: Its a default C# WPF app.
EDIT: Title
Thank you.
Its a TeamViewer issue.
Debug doesnt work in with TeamViewer running.
You have to close TeamViewer.
Start debugger
Close all debugging windows (Watch, Memory)
End debugger
You can now open Teamvierwer again
Source:
https://connect.microsoft.com/VisualStudio/feedback/details/817590/microsoft-visual-studio-express-2013-for-windows-desktop-hangs-on-debug

VB6 starting with Microsoft Professional Studio Professional 2012 initialization window

For some reason, once and again I start VB6, and the window "Microsoft Visual Studio Professional 2012" pops up.
This is a screenshot:
I guess something was changed and either VB6 or VS2012 struggles to find it again.
Am I right?
I used ProcMon to determine which files are trying to be accessed, but it did not spit out anything.
This window is highly annoying. It takes around 3 minutes to be unloaded.
At the next start of VB6, it pops up again.
I can cancel it, but having to do that is also really annoying. Also I would like to find out what causes this behaviour.
Can anybody help?
ps: Sometimes when I click "Cancel", I get the following message:
ps: At least I have found out that the process is MSIEXEC.EXE that does this...
It could be a Windows Installer shortcut being used to start Windows (you can tell in the shortcut's property if you can't edit it). Make a normal shortcut to vb6.exe.
Try this selecting VS2012 (this is Vista but other versions have similar)
Fixit
Microsoft have a range of automatic programs to fix common problems. For Windows Installer problems see
http://support.microsoft.com/mats/Program_Install_and_Uninstall/en-us
For the full list visit
http://support.microsoft.com/fixit/en-us
When you choose to download it, choose the option to run on another computer. Then you can save it to your harddisk in a folder. Open the folder, open the folder Fix it Portable, and run Launch Fix It. It will contain all 27 Fixits.
How To Use Fixit
Start Fix problems that programs cannot be installed or uninstalled.
Next you'll be asked Install or Uninstall.
If Installing and you have previously installed or attempted to install try uninstalling first.
Next you will get a list. Choose from that list.

My breakpoints don't hit when I run it for the first time?

I am using Visual Studio 2013. I use a single start up project. There are more than 8 projects in the solution. Here is what I used to do when I was on Visual Studio 2010;
I would Build the solution. Then run it from its .exe file in /bin/Debug, then on Visual Studio, I would Attach to Process and it would start debugging and it would always hit the breakpoints as long as the source code and the .exe are not different.
This is the same thing that I do on Visual Studio 2013. I put the breakpoints in a file in my startup project. I build the solution (it says it successfully builded on the output window), or I Start Without Debugging, then attach to process, it says "The breakpoint will not currently be hit. The source code is different from the original version" Then I stop debugging, and without building again, I run the .exe again, attach it, then the breakpoints start hitting. Why do I have to close my .exe and then start it again? I use attach to process a lot and this 'must do twice to hit' is really annoying. I haven't change any configuration or anything. What am I doing wrong? I swear I don't change the source code. Not even a single space. It says "Build succeeded" when I attach it.
I have a similar issue. (on a webproject)
my temp solution:
right click the web project
Select Property Pages
Under Build --> Change the Target Framework to something else than the one selected (Apply the new framework)
Then Change back to your desired framework and Debug

Just my code - Visual Studio 2010

I have enabled Just My Code in the debugging options, but it says it's for managed only.
When I have the debugger in the managed mode, it runs but closes straight after and I can't step into each line of code.
How can I make it work?
When Just My Code is enabled, it is possible to choose Break on the Debug menu and stop execution at a location where there is no My Code to display. When that happens, no code is displayed. Additionally, if you choose a Step command, it will take you to the next line of My Code.
First try to read How to: Step Into Just My Code and then will understand what they do.
As you're saying that debugger is not running, there might be many reasons:
You could type Devenv.exe /SafeMode, which starts Visual Studio in safe mode, loading only the default environment and services.
If it does not work, you could type Devenv.exe /resetsettings. It restores Visual Studio to default settings. Optionally, reset the settings to the specified .vssettings file.
More information about the Devenv.exe command line.
Switch other accounts or create a new account and try it again.
If it doesn’t work still, please uninstall Visual Studio via Add/Remove Program thoroughly and reinstall it again.

Resources