Is there a way to place a Breakpoint on a class, so that whenever control reaches any field, property or method of that class, execution breaks?
Just place the breakpoint at the Constructor of the class, or at a specific method.
Related
I need my package to get initialized when VS starts, without having to trigger it by invoking the Command I implemented in it.
I try those, but that does not work.
[ProvideAutoLoad(UIContextGuids80.SolutionExists)]
[ProvideAutoLoad(VSConstants.UICONTEXT.NoSolution_string)]
[ProvideAutoLoad(VSConstants.UICONTEXT.SolutionExists_string)]
[ProvideAutoLoad(VSConstants.UICONTEXT.SolutionHasMultipleProjects_string)]
[ProvideAutoLoad(VSConstants.UICONTEXT.SolutionHasSingleProject_string)]
public sealed class VSIXProject1Package : AsyncPackage
<
My package is loaded, but the InitializeAsync method won't be called until I click on my command (command1) in the tools menu.
I can set breakpoint to all the functions of particular class as,
ClassName::*
Is it possible to set breakpoint to all the constructors in the code, something like,
*::Constructor //any particular keyword
I am able to set breakpoint using Visual Studio Macros using macro suggested in answer to 'this question'.
I test it in my side using constructors, it doesn't work. I often use the function breakpoint or the Find Combo box and Press F9 manually, like you said that set breakpoint to all the functions of particular class works well, but not the second way for constructors.
A workaround is that you could use certain extension tool like Breakpoint Generator, even if it just help you add breakpoints for the public methods, but it really could help developers add breakpoints easily and conveniently:
https://visualstudiogallery.msdn.microsoft.com/b4aaf8aa-58ab-40a1-b45c-feb3efc94e1e
Of course, I also help you submit a feature request here: https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/16245607-is-it-possible-to-set-breakpoint-to-all-the-constr.
Maybe certain VS extension experts could also provide a good path for this issue.
When I attempt to debug my MVC 3 app a breakpoint is automatically added in the static class RazorGeneratorMvcStart
at in the static Start() method at the line:
ViewEngines.Engines.Insert(0, engine);
When I delete the breakpoint during the run it still comes back and most pages hit this method several times with each call.
Is there a way I can prevent this breakpoint from being added or what is causing the breakpoint to be added here. I have checked the files and it does not show the break point there anywhere I can find. But it gets added to the class every time I hit a view. When not debugging the file does not show the symbol. I tried adding and then removing a breakpoint there as well but that has no effect, a breakpoint is added there the next time a view hit.
If I disable the breakpoint and leave the file open in VS it seems to bypass through out that action. But the next action call the breakpoint returns.
Try Debug -> Delete All Breakpoints (Ctrl + Shift + F9).
Try to delete the breakpoint when the application is NOT running
I'm trying to debug a C++ class. It's a class that gets SWIGged for Python, then I attach debugger to python.exe. No problems there. Breakpoints are hit fine.
But in the 'Locals' window 'this' is completely empty apart from its _vfptr (which does not look right either, just values, no function names). 'this' should have a few member variables!
Function parameters are showing fine. Functions appear to, well, function properly.
Trying to 'Watch' or 'Quickwatch' a variable from the editor window gives 'inaccessible!'.
What foul Visual Studio crime have I committed? This was working fine earlier on!
I cannot open a new window in QT. I new in QT so I think I am missing something. I only write the code below and settings windows just shows itself and closes. I have commented out destructor but still problem persists.
SettingsWindow s;
s.show();
What do I do wrong ? By the way I cannot either debug it, debuger does not stop when it reaches to the first line for example.
Thanks
This can't possibly be the only code you wrote.
However, judging from your description the first thing that comes to mind is probably a missing call to QApplication::exec(). Somewhere in the code you haven't shown here there's an instance of QApplication, probably named app. After calling show on your window, make sure there's a call to exec.
Since you are using a non-pointer var, your window is destroy when it go our of scope (at the end of the function). If you use a pointer when exiting the function the memory is not deleted so you Windows will still be shown. But you will not be able to clean memory when closing the window if you can't anymore access to your pointer.
Maybe you need to create your window as member of the calling class in order to be able to destroy the window AND clean memory once you don't need anymore to display it (for example in the calling class destructor).