首页
社区
课程
招聘
[转帖]Time Travel Debugging in WinDbg Preview!
发表于: 2017-9-30 14:52 4091

[转帖]Time Travel Debugging in WinDbg Preview!

2017-9-30 14:52
4091

Time Travel Debugging is now available in WinDbg Preview

We are excited to announce that Time Travel Debugging (TTD) features are now available in the latest version ofWinDbg Preview. About a month ago, we releasedWinDbg Previewwhich provides great new debugging user experiences. We are now publicly launching a preview version of TTD for the first time and are looking forward to your feedback.

What is TTD?

Wouldn't it be great to go back in time and fix a problem? We can't help you go back in time to fix poor life choices; but we can help you go back in time to fix code problems.

Time Travel Debugging (TTD) is a reverse debugging solution that allows you to record the execution of an app or process, replay it both forwards and backwards, and use queries to search through the entire trace. Today's debuggers typically allow you to start at specific point in time and only go forward. TTD improves debugging since you can go back in time to better understand the conditions that lead up to the bug. You can also replay it multiple times to learn how best to fix the problem.

TTD is as easy as 1 - 2 - 3.

Record:Record the app or process on the machine which can reproduce the bug. This creates a Trace file (.RUN extension) which has all of the information to reproduce the bug.Replay:Open the Trace file in WinDbg Preview and replay the code execution both forward and backward as many times as necessary to understand the problem.Analyze:Run queries & commands to identify common code issues and have full access to memory and locals to understand what is going on.

Getting Started

I know you are all excited and ready to start using TTD. Here are a few things you should know to get started.

Install:You can use TTD by installing the WinDbg Preview (build 10.0.16365.1002 or greater) from the Store if you have Windows 10 Anniversary Update or newer athttps://aka.ms/WinDbgPreview.Feedback:This is a preview release of TTD, so we are counting on your feedback as we continue to finish the product. We are using the Feedback Hub to help us prioritize what improvements to make. You can easily provide feedback directly in WinDbg Preview by clicking the Feedback Hub button on the Home ribbon; otherwise open the Feedback Hub from Start and select Category = Developer Platform and Subcategory = Debugging Tools for Windows (WinDbg, KD, CDB, NTSD). The Windows Insider website has a great overview on how to give good feedbackhttps://insider.windows.com/en-us/how-to-feedback. You can also email us atWinDbgFb.Questions:We expect you will have some questions as you work with TTD. So feel free to post them on this blog or send them in the Feedback Hub and we will do our best to answer. We'll be posting an TTD FAQ on our blog shortly.Documentation:We've got some initial documentation athttps://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-overviewand will be improving our content based upon customer feedback and usage. You can give us feedback or propose edits on the docs.microsoft.com documentation by hitting "Comments" or "Edit" on any page.Blogs:Watch for more in-depth TTD updates and tips in the future on our team's bloghttps://blogs.msdn.microsoft.com/windbg.Videos:We went to the Channel 9 studio and recorded a couple of episodes of Defrag Tools to help explain some of the basics of TTD in WinDbg Preview.Defrag Tools 185: Ivette and JamesP go over the basics of TTD and demo some features in WinDbg PreviewDefrag Tools 186 (Coming Soon): Jordi and JCAB demo more great features of TTD in WinDbg PreviewComing Soon: stay tuned for videos which show the power of queries, using TTD object model and more

How to use TTD

You use TTD directly in the WinDbg Preview app. We have added all of the key TTD features into WinDbg Preview to provide a familiar debugging experience which makes it intuitive to go backwards and forwards in time during your debugging session.

Record a Trace

WinDbg Preview makes it easy to record a trace. Simply clickFile >> Start Debuggingand point to the app or process. You will have an option to Record during attach and launch. Seehttps://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-overviewfor more information.

Replay a Trace

Once the Trace is complete, we automatically load and index the Trace for faster replay and memory lookups. Then simply use the WinDbg ribbon buttons or commands to step forwards and backwards through the code.

Basic TTD Commands

You can use the ribbon or enter the following TTD commands in WinDbg Preview. Seehttps://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-overviewfor a complete list of TTD commands.

CommandDescriptionpStep forwards (F10)p-Step backwardsgGo forwards (F5)g-Go backwardstTrace forwards (F11)t-Trace backwards!tt <position>Travels to the given position in the trace by percentage or using a XX:YY position code!positionsDisplays the current position for every thread

Final Thoughts

We are very excited to get TTD into the hands of our developers; but there are a few things to remember.

TTD is a preview, so we will be regularly improving performance and featuresThis only runs on Windows 10 since WinDbg Preview is a Store appSee docs.microsoft.com documentation for TTD known issues and compatibility

Welcome to the world of time travel. Our goal is to improve the lives of developers by making debugging easier to increase product quality. Please send us feedback and feature requests in the Feedback Hub to let us know how we are doing!

TagsDebuggingTime Travel DebuggingTTDWinDbg Preview

_https://blogs.msdn.microsoft.com/windbg/2017/09/25/time-travel-debugging-in-windbg-preview/


[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!

收藏
免费 2
支持
分享
最新回复 (2)
雪    币: 58
活跃值: (1135)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
终于开放出来了,以前只能内部用。
2017-9-30 15:56
0
雪    币: 200
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
3
在哪了可以下载 如果不使用win自带的商店
2019-10-19 10:33
0
游客
登录 | 注册 方可回帖
返回
//