Visual studio 2015 . How to *not* step in certain functions? - c++

I'd like to configure the VS2015 debugger so that when I'm stepping in into some code (F11), it steps through certain functions .
For example, let's say there is a template class SmartPointer which has an overloaded member -> .
If I have the following statement :
SmartPointer<SomeClass> ptr;
/* initialize ptr */
ptr->method();
The debugger will step into SmartPointer::operator->, exit, then the into method().
I'd like to directly step into method().
Is this possible ?
EDIT : The so called duplicate isn't one because it doesn't work with vs2013 or 2015

Ok I actually found the solution. You have to edit as an administrator:
C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\Packages\Debugger\Visualizers\default.natstepfilter
or
C:\Program Files\Microsoft Visual Studio
14.0\Common7\Packages\Debugger\Visualizers\default.natstepfilter
depending if you're under a 64 or 32 bit machine. The add a line like
<Function><Name>SomeFunction</Name><Action>NoStepInto</Action></Function>
HTH

Related

Mangling and static/dynamic binding in visual studo 2019

For C++ class can I see the intermediate compilation stage/s? : variable/methods mangling?
some readable representation of generated code for static binding ? vtable?
for students
VS ILDasm is a tool that can decompile code. You could add ILDasm in VS.
Here are the steps:
Select Tools->External Tools->ILDasm
Select the path of ILDasm.exe in Command. The path is generally C:\Program Files\Microsoft SDKs\Windows\vXXX\bin\NETFX 4.0 Tools\ildasm.exe.
Type $(TargetPath) /text/item: in Arguments, then click Apply

Locating error in source which is boost related [duplicate]

This question already has answers here:
C++ Boost: what's the cause of this warning?
(6 answers)
Closed 2 years ago.
I'm porting an old project from Boost 1.48 to Boost 1.61. The project is compiled using MSVC 2013. There are several reported errors during build which I think are boost related but unfortunately the bug reports are not very helpful at all.
3> entry.cpp
4>c:\program files (x86)\microsoft visual studio 12.0\vc\include\xutility(2715): error C2220: warning treated as error - no 'object' file generated
4>c:\program files (x86)\microsoft visual studio 12.0\vc\include\xutility(2715): warning C4996: 'std::_Fill_n': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
4> c:\program files (x86)\microsoft visual studio 12.0\vc\include\xutility(2701) : see declaration of 'std::_Fill_n'
4> c:\boost\boost_1_61_0\boost\random\detail\polynomial.hpp(114) : see reference to function template instantiation '_OutIt std::fill_n<boost::random::detail::polynomial_ops::digit_t*,size_t,boost::random::detail::polynomial_ops::digit_t>(_OutIt,_Diff,const _Ty &)' being compiled
4> with
4> [
4> _OutIt=boost::random::detail::polynomial_ops::digit_t *
4> , _Diff=size_t
4> , _Ty=boost::random::detail::polynomial_ops::digit_t
4> ]
I cannot see anything in the above that helps me identify where the problem is, there are no line numbers and the snippet of code is not from the compiled file.
#Eljay, does it have a human readable text option I could locate in the IDE? – SPlatten 43 mins ago
The thing you posted IS human readable text. It actually describes a warning with a reference to documentation. ¯\(ツ)/¯ Maybe you can just tell the compiler you don't want to receive warnings
In addition, you can use the keywords to google additional information:
C++ Boost: what's the cause of this warning?
Many libraries in addition already have a warning-suppression header (look for e.g. boost/iostreams/detail/config/disable_warnings.hpp or boost/random/detail/disable_warnings.hpp). The fact that known benign warnings "slip through" might indicate that the library needs to update their suppressions, OR you might need to upgrade your boost version.

Experimenting with threads priority C++

i'm attempting to execute the code given as example here : https://en.cppreference.com/w/cpp/thread/thread/native_handle
But when i compile it in Visual Studio 2017 on Windows 10 x64 machine
i have this error
E0415 no constructor exists for converting "std::thread::native_handle_type" to "ptw32_handle_t"
I simply copied the code.... where i'm wrong ?
Tnx, Fabio.

run error xmemory() with function findchessboardcorners()?

I am using OpenCV and MS Visual Studio 2013 to simply detect chessboard. It compiles and build all fine but gives a runtime error in xmemory0() file located in:
c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xmemory0
I just cant seem to understand the problem. Any thought would be appreciated.
The debugger breaks in xmemory0(), I thought that the problem in findChessboardCorners() function and library opencv-core2410. I tried same function with vs2010 and it works, but I need to do it with vs2013.
After hard work i found that i must determine the size of cv::vector variables before use it, for example:
cv::vector<Point2f> corners;
corners.resize(54);
bool patternfound = findChessboardCorners(gray, patternsize, corners,CV_CALIB_CB_ADAPTIVE_THRESH | CV_CALIB_CB_FAST_CHECK | CV_CALIB_CB_NORMALIZE_IMAGE);
I didn't need to resize vector in vs2010 but just in vs2013.

"Undeclared identifier" error if trying to include libvlc under Windows in C++

I Include the file "libvlc.h" from the VLC main git repository (https://github.com/videolan/vlc.git) in my Visual Studio project, I get various error e.g.
The identifier "libvlc_int_t"" is not declared. Video [...]\vlc\src\libvlc.h 34
What am I doing wrong?
This is my (german) VS output:
http://pastebin.com/MkAeJzgv
I had the same in Visual Studio 2010 Update 1. However, it was easily fixed
replacing all the occurrences of "ssize_t" by "intptr_t".
Original comment by felipe.a...#gmail.com on 8 Feb 2013 at 1:22
It works.
define ssize_t to SSIZE_T in predefined headers (ex:"stdafx.h") in Visual studio .