Breaking News

Main Menu

Microsoft Debug Diagnostic Tool Tutorial

вторник 21 апреля admin 86

Launch the Debug Diagnostics tool from Start, Programs, IIS Diagnostics, Debug Diagnostics Tools, Debug Diagnostics Tool 1.0. Click the Advanced Analysis tab. Under Available Analysis Scripts click to select Crash/Hang Analyzers to analyze a crash/hang dump or click to select Memory Pressure Analysis to analyze a memory dump of a process suspected of leaking. The Debug Diagnostic Tool (DebugDiag) is designed to assist in troubleshooting issues such as hangs, slow performance, memory leaks or memory fragmentation, and crashes in any user-mode process. The tool includes built-in analysis rules focused on Internet Information Services (IIS) applications, web data access components, COM+, SharePoint.

I’m thrilled to announce a new tool to better understand, debug, and improve your apps. Monitor provides a running log of all the activity within your app allowing you to see how declarative formulas are actually doing their work.

This first version is focused on network activity similar to a network trace in the browser. You can drill into details of each network call including how long they took, how much data was returned, and if there was an error. We also provide context for the request by mapping to the formula that made it.

But this is just a first step. In the future we will log activities that don’t hit the network, allowing you to see variable and collection changes, performance implications of screen loading and rendering, and much more. And we have even more advanced tools in mind for power users and professional developers.

NOTE: At this time, only network traffic for tabular data sources are included in the Monitor, such as Common Data Service, SharePoint, and SQL Server. There will be no activities shown for non-tabular connectors, custom connectors, and Flow. For example calls to the the Office 365 Users connector will not show any activity. We understand that these other sources are very important too and we are actively working on adding them. This blog will be updated when they are also included.

Let’s take a look. On the left hand side of Canvas Studio there is a new tool icon that opens up a tray of Advanced tools:

Monitor is listed as an experimental feature. Although it is experimental, there is no need to enable it in the File menu’s advanced settings like other experimental features since it has no impact on your app unless you turn it on and then only for that Studio session. You can use Monitor with any app in a test environment or in production.

Selecting Open monitor opens up a new browser tab and connects to the existing Studio session. It immediately starts recording and displaying all the network activity in your app:

Note that we don’t start recording the log until you open the Monitor, and the Monitor can only be opened from Studio. So there is no way to obtain a log for a production app, something we may support in the future.

You can drill into the details of an event by selecting a row. Details provides a high level overview of the event. To help keep the display manageable, portions of the JSON may be collapsed, as is “data” in this example:

Finkit for mac. Finkit.dmg is the common file name to indicate this program's installer. FinKit for Mac is categorized as Business Tools. Our built-in antivirus scanned this Mac download and rated it as 100% safe. The most popular versions among the application users are 3.2 and 3.0. You can launch FinKit on Mac OS X 10.4.0 or later. FinKit for Mac. FinKit for Mac. Free to try Paranzasoft Mac OS X 10.5 Intel/10.6/10.7/10.8/10.9 Version 3.3.5 Full Specs. Average User Rating: 5 User Votes 5.0. Out of 2 votes.

Formula provides context on which formula in your app caused the event. The name of the control property is displayed both in the table and at the top of this tab. At this time, we can’t isolate the exact function call within a large formula, but this is one of many enhancements we have planned. Note that the operation is listed as createRow which is not a formula language function; this is an internal operation name corresponding to the Patch function. In general, tighter mapping to what is in your formulas is on our backlog.

Request is the actual network request that was made.

And Response is what was returned. There are two ways to look at the response, first in a tabular format where tables and records are shown in a grid:

But you can also display the response in JSON format using the drop down control on the right of the screen above the data:

In this ecample, I’m using the Northwind Sample Data app that is included with the Northwind sample solution. This is a Canvas app that pumps sample data into Common Data Service:

An earlier version of this app had poor performance and would randomly generate errors with no explanation or apparent pattern. Sometimes it failed and sometimes it worked fine.

To debug this app, the first step was to understand the errors. Here’s one of them as seen in Monitor, with the key error message highlighted at the bottom right. This and other requests are returning 429 HTTP status codes, which indicates too many requests, with the specific error message “Rate limit is exceeded.” At present, this error message does not make it into the app. But in Monitor it is easy to see:

What does this mean? Like many services, Common Data Service will throttle requests if there are too many requests or they are coming in too rapidly.

So are requests coming in too rapidly? Let’s look at that Monitor log again. For each createRow call we are generating a lot of getRows requests from the ProgressCount.Text property, each to a different entity and not to the entity we are creating rows in. Let’s look at the formula:

This formula is for the count of rows shown in the Records column to the right in the gallery. It appears that for each record added, this formula is being reevaluated and CountRows is being called on many of the entities, resulting in getRows in the log since CountRows isn’t delegated for CDS. For each 1 request to add a record, we are potentially making 12 additional requests.

To test this hypothesis, comment out the formula and replace it with a static text string. Sure enough, the number of requests comes way down, errors go away, and performance is greatly improved. Not only were these extra requests sporadically causing the errors due to hitting the CDS request throttle but it also explained the performance problem. Room planner chief architect for mac.

The permanent fix for this app was to do the CountRows manually for each entity as records were being created in it. The animated Monitor log shown earlier is of that improved app and there are no getRows operations after each createRow, instead they are all done after the rows have been added.

Canvas apps are declarative. As a maker, you describe “what” you want the app to do without needing to say “how” it is to be done. In this example, the formula for ProgressCount.Text described succinctly what was to be displayed. The maker didn’t need to say when the information was to be refreshed and that is a great thing. The original app was written correctly.

Because the maker doesn’t specify “when” the system must determine when the information is to be refreshed. By doing analysis across the entire app, the system usually does a great job of optimizing this, far better than most makers would on their own. But there are cases where the system will be too careful and do more work than is needed, with performance implications and in this case functional errors due to throttling. The system can be smarter and only update the count for the entity with the added record, and in fact since I started showing this demo internally the team has made it increasingly hard for me to recreate the errors.

The work around is too be less declarative, take some control back from the system, and do the work manually using imperative means, App.OnStart and Screen.OnVisible events, and caching in state variables. Most performance optimizations in Canvas apps are based on doing this. Use this sparingly and with care as imperative logic is often harder to understand and maintain.

The key to figuring all this out is a better understanding what is actually happening in your app. There often isn’t enough information when looking at the app statically or even when investigating runtime errors. You need to watch the machine in operation and that is why we have added the Monitor.

And we are in good company. SQL is one of the most popular declarative computer language. Most SQL implementations offer tools to understand how the declarative query is translated into concrete actions. For example, here is a SQL query and how it is translated into a query plan. With this information, the performance implications of doing joins and adding indices can be better understood.

Monitor is our first tool to expose the declarative implementation details so formula writers can make better decisions. Not everyone will want to get to this level of detail, and that’s just fine, we’ll keep improving our optimizations too for everyone’s benefit.

I can’t emphasize enough that this is but a first step. I’ve noted a number of places that could use improvement and those and more are being actively worked on. We wanted to get something basic out the door to gather your feedback. And we have already been finding it helpful within our team.

How do you debug apps? What do you find helpful? What could we add to this tool to make it more helpful to you? What information is missing? What other diagnostic tools should we add?

Really, we’re asking. You’ll notice a Provide feedback drop down at the bottom of the Monitor window. This leads to our community forum. Please let us know what you think.

Monitor grew out of our own experience helping customers debug apps. You may have a completely different experience and we’d love to learn from it.

There are some obvious next steps which we are already pursuing:

  • Import/Export. Export your log to a file so you can send it to a friend or helpdesk.
  • Remote. Share your Monitor session with a friend or helpdesk so they can watch and examine the log in real time.
  • Column selection. Today there is no way to adjust the columns displayed. There is more information we could offer and we’d also like to focus the columns when working on performance versus a functionality bug.
  • Timeline. See a graphical timeline of activities, similar to what is seen in most network traces in the browser.
  • Model-driven apps. Today Monitor is Canvas only. We plan to add it to Model-driven apps too.

You may be wondering why we don’t yet offer a traditional debugger with breakpoints, watch windows, and the like. It has been discussed and we may add this in time for imperative behavior formulas. But even if we did, it would not have helped much with my earlier example as the performance problem was coming from a data flow formula that is not imperative. There would be no breakpoint to set. Again using SQL as a guide, there is no way to set a breakpoint in the middle of a SQL query. Flow is another good example where the result and timing of each action is available for postmortem analysis after the run.

Debugging Tools for Windows (WinDbg, KD, CDB, NTSD). 3 minutes to read.In this articleStart here for an overview of Debugging Tools for Windows.

This tool set includes WinDbg and other debuggers. Install Debugging Tools for WindowsYou can get Debugging Tools for Windows as part of a development kit or as a standalone tool set:.As part of the WDKDebugging Tools for Windows is included in the Windows Driver Kit (WDK). To get the WDK, see.As part of the Windows SDKDebugging Tools for Windows is included in the Windows Software Development Kit (SDK). To download the installer or an ISO image, see on Windows Dev Center.As a standalone tool setYou can install the Debugging Tools for Windows alone, without the Windows SDK or WDK, by starting installation of the Windows SDK and then selecting only Debugging Tools for Windows in the list of features to install (and clearing the selection of all other features).

To download the installer or an ISO image, see on Windows Dev Center.Get started with Windows DebuggingTo get started with Windows debugging, see.To get started with debugging kernel-mode drivers, see. This is a step-by-step lab that shows how to use WinDbg to debug Echo, a sample driver that uses the Kernel-Mode Driver Framework (KMDF).

Debugging environmentsIf your computer has Visual Studio and the WDK installed, then you have six available debugging environments. For descriptions of these environments, see.All of these debugging environments provide user interfaces for the same underlying debugging engine, which is implemented in the Windows Symbolic Debugger Engine (Dbgeng.dll). This debugging engine is also called the Windows debugger, and the six debugging environments are collectively called the Windows debuggers. NoteVisual Studio includes its own debugging environment and debugging engine, which together are called the Visual Studio debugger. For information on debugging in Visual Studio, see.

For debugging managed code, such as C#, using the Visual Studio debugger is often the easiest way to get started. Windows debuggersThe Windows debuggers can run on x86-based, x64-based, or ARM-based processors, and they can debug code that is running on those same architectures. Sometimes the debugger and the code being debugged run on the same computer, but other times the debugger and the code being debugged run on separate computers. In either case, the computer that is running the debugger is called the host computer, and the computer that is being debugged is called the target computer. The Windows debuggers support the following versions of Windows for both the host and target computers. Windows 10 and Windows Server 2016.

Windows 8.1 and Windows Server 2012 R2. Windows 8 and Windows Server 2012. Windows 7 and Windows Server 2008 R2Symbols and symbol filesSymbol files store a variety of data that are not required when running the executable binaries, but symbol files are very useful when debugging code. For more information about creating and using symbol files, see. Blue screens and crash dump filesIf Windows stops working and displays a blue screen, the computer has shut down abruptly to protect itself from data loss and displays a bug check code.

For more information, see. You analyze crash dump files that are created when Windows shuts down by using WinDbg and other Windows debuggers. For more information, see.

Tools and utilitiesIn addition to the debuggers, Debugging Tools for Windows includes a set of tools that are useful for debugging. For a full list of the tools, see. Additional documentationFor additional information related to Debugging Tools for Windows, see. For information on what's new in Windows 10, see. Related Articles.