1 Advanced.Net Debugging Using Visual Studio, R# and OzCode IT Week, Summer 2015.

Slides:



Advertisements
Similar presentations
COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
Advertisements

Debugging What can debuggers do? Run programs Make the program stops on specified places or on specified conditions Give information about current variables’
Chapter 15 Memory Management: Four main memory areas for a C++ program: Code: code for instructions, methods, etc. static data: Global variables (declared.
“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
Finding and Debugging Errors
Visual Basic Debugging Tools Appendix D 6/27/20151Dr. Monther Aldwairi.
DEBUGGERS For CS302 Data Structures Course Slides prepared by TALHA OZ (most of the text is from
Internet Explorer 11 Developer Tools, F12, Just Got Nicer (Again)
Using a Debugger. SWC What is ”debugging”? An error in a computer program is often called a ”bug”… …so, to ”debug” is to find and get rid of errors in.
Debugging Cluster Programs using symbolic debuggers.
Debugging applications, using properties Jim Warren – COMPSCI 280 S Enterprise Software Development.
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
Compiling & Debugging Quick tutorial. What is gcc? Gcc is the GNU Project C compiler A command-line program Gcc takes C source files as input Outputs.
CSE 332: C++ debugging in Eclipse C++ Debugging in Eclipse We’ve now covered several key program features –Variable declarations, expressions and statements.
Debugging Dwight Deugo Nesa Matic
Our Environment We will exercise on Microsoft Visual C++ v.6 We will exercise on Microsoft Visual C++ v.6 because that is what we have in the univ. because.
Debugging. 2 © 2003, Espirity Inc. Module Road Map 1.Eclipse Debugging  Debug Perspective  Debug Session  Breakpoint  Debug Views  Breakpoint Types.
Debugging in Java. Common Bugs Compilation or syntactical errors are the first that you will encounter and the easiest to debug They are usually the result.
1 Debugging: Catching Bugs ( II ) Ying Wu Electrical Engineering & Computer Science Northwestern University EECS 230 Lectures.
VB – Debugging Tools Appendix D. Why do we need debugging? Every program has errors, and the process of finding these errors is debugging Types of errors.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
Proposed Debugger Features Ken Ryall Warren Paul.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of The Eclipse debugger.
Version 5. ¿What is PAF? PAF is a tool to easily and quickly implement… …distributed analysis over ROOT trees. …by hiding as much as possible the inherent.
1.NET Web Forms Visual Studio © 2002 by Jerry Post.
Debugging and Profiling With some help from Software Carpentry resources.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Debugging Visual Basic.NET Programs ► ► Use debugging tools ► ► Set breakpoints and correct mistakes. ► ► Use a Watch and Local window to examine variables.
A Tutorial on Introduction to gdb By Sasanka Madiraju Graduate Assistant Center for Computation and Technology.
Debugging Xin Tong. GDB GNU Project debugger Allows you to see what is going on `inside' another program while it executes or crashed. (Faster than printing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 What we'll cover here l Using the debugger: Starting the debugger Setting.
Georgia Institute of Technology Creating Classes part 2 Barb Ericson Georgia Institute of Technology June 2006.
Msdevcon.ru#msdevcon. ИЗ ПЕРВЫХ РУК: ДИАГНОСТИКА ПРИЛОЖЕНИЙ С ПОМОЩЮ ИНСТРУМЕНТОВ VISUAL STUDIO 2012 MAXIM GOLDIN Senior Developer, Microsoft.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Visual Basic Integrated Development Environment (IDE) 56:150 Information System Design.
17/02/2016S. Ponce / EP-LBC1 Debugging Under Linux Sebastien Ponce Friday, 8 March 2002.
CSC 1201 LAB RULES Nouf Aljaffan (C) CSC 1201 Course at KSU.
What's New in Visual Studio 2010 Debugging Brian Peek Senior Consultant, ASPSOFT, Inc. Microsoft MVP - C#
Improving Your Application with IntelliTrace #ITDevConnections.
1/21/2018 6:52 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Debugging and Troubleshooting Code
Dept of Computer Science University of Maryland College Park
Debugging Dwight Deugo
Computer Programming I
Debugging CMSC 202.
LESSON 20.
Debugging Techniques.
Unleash the power of Delphi debugger
Using Visual Studio with C#
Important terms Black-box testing White-box testing Regression testing
Quick Start Guide for Visual Studio 2010
DEBUGGING.
Important terms Black-box testing White-box testing Regression testing
Debugging with Eclipse
Super Charge Your Debugging in Visual Studio
DEBUGGING JAVA PROGRAMS USING ECLIPSE DEBUGGER
Debugging at Scale.
Debugging Taken from notes by Dr. Neil Moore
Testing, debugging, and using support libraries
Our Environment We will exercise on Microsoft Visual C++ v.6
DEV354 Visual Studio 2005: New Enhancements For Debugging Applications
Debugging Taken from notes by Dr. Neil Moore
Debugging Visual Basic Programs
Debugging Dwight Deugo
Windows Service Applications
Visual Studio Tooling Developer’s Guide to Windows 10
How to debug a website using IE F12 tools
Advanced Debugging With Visual Studio & OzCode
Debugging with Eclipse
Presentation transcript:

1 Advanced.Net Debugging Using Visual Studio, R# and OzCode IT Week, Summer 2015

2 Why debug? It is ‘legacy’ code 1 There is no logging or tests 2 The problem was not localized properly by testers 3 You get a repro only once a few hours (seldom) 4 You are exploring new APIs 5

3 Settings

4 Break on first chance exceptions

5 Project: Demo1_ControlFlow Problem: the code goes to unexpected place Breakpoints Step Into Demo 1: basic setup Description Debugging Tools

6 Project: Demo2_pdb_makes_a_difference! Problem: where did the exception happened? pdb files, ‘ReSharper → Tools → Browse Stack Trace’ Demo 2: pdb files Description Debugging Tools

7 Use to investigate code without setting a lot of breakpoints Control flow: Step Out/Into/Over

8 Use when: You want to skip some code and do not want to recompile/rerun it. You missed some important code and it is safe to run it again. Control flow: Set Next Statement

9 Use instead of a bunch of ‘Step Over’ or instead of setting a breakpoint, running to it and then removing it Control Flow: Run To Cursor

10 Debug → Windows You need to be in Debug mode to see them Debug windows

11 Run [almost] any code you want when in a Debugger: 1. Inspect variables 2. Set values Limitations: implicitly-typed arrays, lambda expressions, etc. Debug Windows: Immediate Window

12 See where are you now Go up the stack to see arguments and other values Debug Windows: Call Stack

13 Watch: you have full control over what is in here Locals: values that are local to current scope (function, class, etc.) Autos: whatever is available in current scope (static variables, parameters, locals, etc.) Debug Windows: Autos, Locals, Watch

14 Use: 1. When you need to dive really deep into the object 2. To add a lot of fields or properties in Watch window Debug Windows: quick watch

15 Easy to inspect variable on the fly, without pointing to them with mouse. It is possible nested values. Pinning quick watch

16 1. Delete breakpoints (after all of them are not needed) 2. Export/Import breakpoint to switch between Debug Sessions Debug Windows: breakpoints

17 May have: 1. A condition 2. A ‘When hit’ statement 3. ‘Hit counter’ 4. ‘Filter’ Breakpoint

18 Allows to avoid breakpoint being hit when based on some local variables, parameters, etc. Breakpoint: condition

19 Useful when you need to skip the first hit, or the first few hits (warmup period) and you have no control to do it with condition. Breakpoint: hit count

20 You can use it as a trace point - to run some basic code, most likely a print message with current state. If you uncheck ‘Continue Execution’ you can run the program for a while and then inspect ‘log’ without any modification to real code. Breakpoint: when hit

21 Project: Demo3_Multiple_Controllers Problem: expected method is not called trace points conditional breakpoints Demo 3: Solving a real problem Description Debugging Tools

22 Allows to watch all Task-based threads (all threads are available in Threads window) and switch between them. Parallel Stacks and Parallel Tasks

23 Parallel Stacks and Parallel Tasks

24 Project: Demo4_ParallelStacks Problem: deadlock Parallel Stacks Parallel Stacks: Demo Description Debugging Tools

25 Add Id to the object in scope Access it anywhere else by given id while object still in memory Object Id

26 Separate window to view results with timestamp, threadId and stack trace included by default. OzCode: Trace Points

27 Quick view for nested properties. Most useful in collections. OzCode: Reveal

28 Compare two objects Compare the same object before and after some function OzCode: Compare

29 Find deep nested values of properties Search item in collection OzCode: Search

30 Parallel Stacks: [1] [2][1][2] Visual Studio book (lots of goodies) Visual Studio book Debugging multi-threaded applications OzCode Latest demo at TechEd2014, Build 2015 TechEd2014Build 2015 Release optimizations External references