Tabs Studio is a Visual Studio and SSMS add-in empowering you to work comfortably with any number of open documents.
v3.0.3 adds detection for Custom Document Well. See the full what’s new list.
Tabs Studio is a Visual Studio and SSMS add-in empowering you to work comfortably with any number of open documents.
v3.0.3 adds detection for Custom Document Well. See the full what’s new list.
Tabs Studio is a Visual Studio and SSMS add-in empowering you to work comfortably with any number of open documents.
v3.0.1 improves and simplifies tab coloring. See the full what’s new list.
Tabs Studio is a Visual Studio and SSMS add-in empowering you to work comfortably with any number of open documents.
v3.0.0 adds support for Visual Studio 2012 color themes and the right preview tab position. See the full what’s new list.
Tabs Studio is a Visual Studio and SSMS add-in empowering you to work comfortably with any number of open documents.
v2.8.2 adds support for Visual Studio 2012 RTM. See the full what’s new list.
Tabs Studio is a Visual Studio and SSMS add-in empowering you to work comfortably with any number of open documents.
v2.8.0 adds support for Visual Studio 2012 RC. See the full what’s new list.
Tabs Studio is a Visual Studio and SSMS add-in empowering you to work comfortably with any number of open documents.
v2.7.2 adds support for Visual Studio 11 Beta and SQL Server 2012 Management Studio. See the full what’s new list.
NCrunch by Remco Mulder intelligently executes your .NET unit tests in background and displays test results in-line with your code in the Visual Studio editor. It saves you time to run tests manually and wait for their execution. It also gives you almost immediate feedback on code correctness as you type.
NCrunch fully supports most popular .NET unit testing frameworks like NUnit and MS Test. After the installation all you have to do is enable it for your solution via the NCrunch top level menu in Visual Studio. NCrunch will quickly execute your tests in background and display test results in-line with both tests and implementation code:
The current tests status is also displayed in the NCrunch Tests tool window:
The interesting part begins when you create a new test or change existing code. Just as you type, without explicitly saving your changes, NCrunch builds your code and re-runs tests. Designed with big projects in mind, NCrunch intelligently analyzes build dependencies, prioritizes tests execution order and uses asynchronous processes, additional processing cores, thread/process prioritization to minimize effects on Visual Studio IDE performance. Any test failures are immediately shown in the Visual Studio editor. Hovering over the error marker displays exception text:
NCrunch also collects code coverage information and marks lines not executed by unit tests by black dots. Code coverage also enables you to navigate to any covering tests from any line of code:
Plus NCrunch measures tests execution time. For each line you can see its execution time and particularly slow lines are specially colored:
NCrunch is currently free of charge, supports Visual Studio 2008/2010/11 and NUnit/MS Test/Xunit/MbUnit/MSpec unit testing frameworks. You can download the latest installer from the official home page.
Visual Lint by Riverblade integrates most popular static C++ code analysis tools with Visual Studio. It supports Gimpel PC-lint, CppCheck, Google cpplint.py and Inspirel Vera++. Visual Lint lets you run these tools from Visual Studio with a single click for a selected file or a solution and displays analysis results in the Visual Studio editor or a tool window:
Visual Lint doesn’t do any code analysis itself. It passes information about your Visual Studio project to the selected external analysis tool, parses analysis results and displays them in the most convenient way in Visual Studio. One limitation is that Visual Lint can’t run all configured tools at once to cover all kinds of issues; you need to manually switch between CppCheck, cpplint etc:
Visual Lint also support C# code analysis via FxCop and Java analysis via FindBugs. All Visual Studio versions from VC 6 to VS 2010 are supported. A single user Standard Edition license costs $199 USD, but most useful features like code editor markers, multiple tools support and issues filters are only available in the Enterprise Edition that costs $799. You can download a 30-day trial version from the official site.
PVS-Studio by “Program Verification Systems” finds errors in your C++ code statically analyzing files in a Visual Studio solution.
Static analysis tools are a long term investment of time and money in code quality. They can find certain kinds of errors in your code, but in practice for C++ most of the time they just suggest suspicious code fragments for manual review. The balance between found errors and spurious warnings greatly depends on your own codebase. More fixed buffers, type casts and untyped functions like printf you use – more probably real errors will be found. Actually the only way to assess the usefulness of a static code analyzer for your project is to run it on your code. Reading others experiences (like John Carmack’s pursuit to static code analysis) can only prompt you to try it for yourself.
PVS-Studio can detect general C++ errors (storing a pointer to a local variable outside the scope of the variable, buffer overflow, semicolon after if/for/while), 64-bit portability errors (conversions between memsize and 32-bit types, alignment rule changes, deprecated Win64 system calls) and OpenMP errors (missing parallel/omp/for keywords, data races, throw in a parallel section). Overall more than 160 kinds of errors are detected.
You can manually start an analysis for a file, project or solution from the PVS-Studio menu in Visual Studio:
Found errors are displayed in the PVS-Studio analysis results tool window. You can see error description, jump to the code, sort and filter errors, mark an error as a false alarm:
PVS-Studio can automatically run the analysis on changed files after each build. PVS-Studio supports execution from command line and integration with TFS and other build automation systems like CruiseControl .NET and Hudson.
I’ve run PVS-Studio on my file manager. It is written mostly in high level C++ (Boost, standard C++ library, TBB) compiling cleanly with warning level 4 and with CLR extensions enabled. PVS-Studio doesn’t officially support C++/CLR, but seems to processed it successfully. The whole analysis took 8 hours on my quad core machine with Preprocessor set to VisualCPP and 3 processor’s cores used for analysis.
PVS-Studio warned me of identical sub-expressions to the left and to the right of the ‘!=’ operator in my unit tests when I test the overloaded ‘!=’ operator:
errors.assert(!(RelativePath(L"3") != RelativePath(L"3")), L"! 3 != 3");
Warned of empty exception handlers in code when I return false or empty boost::optional in case of an error:
try {
boost::wregex rx(mask, boost::regex::normal | boost::regbase::icase);
if (boost::regex_search(name, rx))
return true;
} catch (const boost::bad_expression&) {
}
return false;
Warned of the .NET ‘list.Items’ pointer used simultaneously as an array and as a pointer to a single object in my unit tests:
WinForms::ListView list;
…
errors.assert_equals(3, list.Items->Count, L"items count with file");
if (list.Items->Count == 3){
errors.assert_equals(
DirectoryPresenter::current_directory_text(), cli_to_wstring(list.Items[1]->Text), L"item 1 with file");
errors.assert_equals(
std::wstring(L"1"), cli_to_wstring(list.Items[2]->Text), L"item 2 with file");
}
Warned of the identical conditional expressions of the ‘if’ operators situated alongside each other in my unit tests. In this case I agree the code can be changed to a single ‘if’ or to ‘mm.size() == 1′ in the first ‘if’:
void t_sliding_text_matches(TestErrors& errors)
{
scalable_vector_path_match_characteristics mm = sliding_text_matches(L"cd_doc", L"cd_");
errors.assert_equals(2u, mm.size(), L"sliding_text_matches: size");
if (mm.size() == 2){
PathMatchCharacteristics m = mm[0];
…
}
if (mm.size() == 2){
PathMatchCharacteristics m = mm[1];
…
}
}
Warned of the identical conditional expressions of the ‘if’ operators situated alongside each other in my DBC assertions:
RelativePath::RelativePath(const std::vector<FileName>& names) : names(names){
REQUIRE(!names.empty());
ENSURE(!names.empty());
}
Warned of the decreased performance when I missed to accept the ‘special_chars’ parameter by reference:
struct ExcludeSpecialChars : public boost::spirit::char_parser<ExcludeSpecialChars>
{
typedef ExcludeSpecialChars self_t;
ExcludeSpecialChars(const std::wstring special_chars) : special_chars(special_chars){
}
private:
std::wstring special_chars;
};
I’ve also run PVS-Studio on a part of my .NET monitor. It again found 2 empty exception handlers. Warned of an odd explicit type casting that I used for direct access of object’s memory:
// REQUIRE(data.size() == sizeof(const void*));
std::wstring PrintString::print(const std::vector<unsigned char>& data) const
{
const void* s = *reinterpret_cast<const void* const*>(&data[0]);
if (s == NULL)
return L"null";
…
As this project is ready for both 32-bit and 64-bit I turned on 64-bit checks and PVS-Studio warned me of several implicit conversions to memsize type in an arithmetic expression and of several magic numbers used. After a review I considered all these code fragments acceptable.
Overall, PVS-Studio showed it can check for non-trivial errors with not many false warnings (for example, Visual Studio code analysis gave me more than 200 warnings). The analysis process is very slow, but background incremental analysis only for changed files after each build alleviates this problem. Integration with Visual Studio works well and is very convenient.
A PVS-Studio license for 5 developers costs €3500 and not affordable to many developers. The freely available trial version hides line numbers for some errors it detects during the analysis, but the error messages and file names give enough context to locate the problematic code manually. A free license for 1 month is available for students, open source developers and bloggers.
PVS-Studio supports C/C++/C++11 applications developed in Visual Studio 2005/2008/2010. You can download the trial version from the official website.
BugAid by Omer Raviv and Vitaly Belman helps you visualize, search and compare live objects data when debugging a C# application in Visual Studio 2008 and Visual Studio 2010.
In the QuickWatch window or in a popup when you hover the mouse over a variable you can search for field names and data:
BugAid supports debugging of C# applications in Visual Studio 2008 and Visual Studio 2010. A personal license costs $49. A 60-day trial version can be downloaded from the official website.
Theme: Shocking Blue Green. Blog at WordPress.com.