Archive for February 22nd, 2011

Where are the Visual Studio Parallel Debug Tools?


Introduction

If you are just venturing into doing things in parallel with Visual Studio this one will be of interest you.

Being someone who is starting out using Visual Studio to develop parallel tasks, I’ve watched some demonstration of the support for parallel tasks in Visual Studio. That was fine, but when I came to get those nice windows up for my project I could not find where they were hidden.

The Parallel Task and Parallel Stack Windowsclip_image002

The only way I have found to get these windows displayed is as follows:

  1. Put some breakpoints into the code which has parallel activity. I put these break points into the “bits” of code I know are off on parallel tasks.
  2. Start debugging the program.
  3. Go to the Debug Tools Tool Bar, and select the “Breakpoints” icon. This then presents the dropdown menu with the parallel tool windows.
  4. There you can see there are keyboard short cuts to open the windows. This is fine if you can get the menu up and read the shortcuts, but I could never find the option to get the menu up. Why, these items only appear when the program is in “debug mode”.

 

Conclusions

  • This is another one of those, “easy when you know how” type of things. It is not entirely obvious when you start looking for the Parallel tools where to find them.
  • There are probably (undoubtable) other ways to get these windows up, but this is the one which I have found.
Advertisements

, , , , , , , ,

1 Comment

Corrigenda, Errata for the “Parallel Load CSV Using SqlBulkCopy”.


Introduction

This post is a “patch up” for the post I made yesterday. The “Parallel Load CSV Data Using SqlBulkCopy” blog posts has one omission.  I have forgotten to post one of the source files. The missing file was the SqlLoadResults class. This file is included below.

SqlLoadResults.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ParallelLoader
{
    /// <summary>
    /// Internal class, could be public of you wanted to pass the results out further
    /// </summary>
    internal class SqlLoadResults
    {
        #region FileName being loaded
        private string _fileName;
        public string FileName
        {
            get { return _fileName; }
            set { _fileName = value; }
        }
        #endregion
        #region Start Time
        private DateTime _startTime;
        public DateTime StartTime
        {
            get { return _startTime; }
            set { _startTime = value; }
        }
        #endregion
        #region End Time
        private DateTime _endTime;

        public DateTime EndTime
        {
            get { return _endTime; }
            set { _endTime = value; }
        }
        #endregion
        #region Rows Loaded
        private long _rowsLoaded;
        public long RowsLoaded
        {
            get { return _rowsLoaded; }
            set { _rowsLoaded = value; }
        }
        #endregion
        #region Rows Skipped
        private long _rowsSkipped;
        public long RowsSkipped
        {
            get { return _rowsSkipped; }
            set { _rowsSkipped = value; }
        }
        #endregion
        #region Elapsed time
        private long _elapsed;
        public long Elapsed
        {
            get { return _elapsed; }
            set { _elapsed = value; }
        }
        #endregion
        #region Rows Returned
        private long _rowsReturned;
        public long RowsReturned
        {
            get { return _rowsReturned; }
            set { _rowsReturned = value; }
        }
        #endregion
        /// <summary>
        /// Constructor for the class
        /// </summary>
        /// <param name="fileName">File which was loaded</param>
        /// <param name="start">Date Time the load started</param>
        /// <param name="end">Data Time the load ended
        /// rowsLoaded">Count of the rows loaded
        /// rowsSkipped">Count of rows skipped</param>
        /// <param name="elapsed">Clock ticks for the duration
        /// rowsReturned">Rows returned from the Data Reader</param>
        public SqlLoadResults(
            string fileName, DateTime start, DateTime end,
            long rowsLoaded, long rowsSkipped, long elapsed,
            long rowsReturned)
        {
            this._fileName = fileName;
            this._startTime = start;
            this._endTime = end;
            this._rowsLoaded = rowsLoaded;
            this._rowsSkipped = rowsSkipped;
            this._elapsed = elapsed;
            this._rowsReturned = rowsLoaded;
        }
    }
}

, , , , , , , ,

3 Comments

%d bloggers like this: