当前位置:网站首页>Visual studio debugging tips
Visual studio debugging tips
2022-06-23 06:00:00 【linchaolong】
VAssistX
VAssistX Download address :http://pan.baidu.com/s/1eQJ9Ud8
Common shortcut key
Find project files :alt+shift+o
Find all references to a class or variable :alt+shift+f
Display a list of methods / To find the way :alt+m

Skip to method implementation / Method statement :alt+g
Switch to .h file /.cpp file :alt+o
Batch change / Method / Class name :alt+shift+r
Breakpoint debugging
Common shortcut key
F10: Process by process
F11: Sentence by sentence
Conditional breakpoint debugging
At run time, if there are many Layout object , But I just want to interrupt _tag by 76888 A method of an object . At this time, you can set the breakpoint condition to achieve .

Right click the breakpoint and select the condition , Add judgment conditions .


Breakpoint setting hits
If a method is called many times , And I just want to interrupt the n Time or >=n perhaps 2n Time operation . This can be achieved by setting the hit times .

Look at the memory
Open the memory window ( Must break a point ):ctrl+alt+m+1
such as , I'll check one here int Values in the type array , Enter the address , The right choice 4 Byte integer ( because int Occupy 4 Bytes ), A signed display indicates a sign , Columns you can select the number of columns to display .

monitor
Select an expression or a variable , Right click to add monitoring , You can get the execution result of the expression or monitor the change of variables .

You can directly click on the name column , Enter the expression directly , Press enter to see the execution result . You can change the value of a variable or execute a function at run time .
Quick monitoring
Shortcut key :shift + f9
In the Quick Monitor window , You can execute expressions at run time .

Recalculate : Re execution
Add monitoring : Add to monitoring window , Because it is temporary monitoring in the quick monitoring window , When the window is closed, it is gone .
call Stack
Shortcut key :ctrl + alt +c
In the call stack window, you can see the call hierarchy of the method .
local variable
Shortcut key :ctrl + alt +l
You can see all the current local variables in the local variables window .
Look at assembly code
Shortcut key :ctrl + alt + d
In the Disassembly window, you can see the assembly code corresponding to the source code .
register
ctrl + alt + g
macro
$(RemoteMachine)
Set to “ debugging ” On the property page “ Remote computer ” The value of the property . For more information , See change for C/C++ Debug the project settings of the configuration .
$(References)
A semicolon separated list of references is added to the project .
$(ConfigurationName)
The name of the current project configuration ( for example “Debug”).
$(PlatformName)
The name of the current project platform ( for example “Win32”).
$(Inherit)
Specify in the command line written by the project generation system , The order in which inherited properties appear . By default , The inherited property appears at the end of the current property .
$(NoInherit)
Make any property that will be inherited not inherited . If you want to avoid calculation at the same level , Please use $(StopEvaluating). Use $(NoInherit) This will result in ignoring any occurrences of... For the same attribute $(Inherit).
$(StopEvaluating)
Immediately stop the calculation of macros in the calculation chain . Appear in the $(StopEvaluating) Any subsequent value will not appear in the calculated value of the macro . If $(StopEvaluating) stay $(Inherit) Before , The inherited value of the current position in the calculation chain will not be connected to the macro value .$(StopEvaluating) yes $(NoInherit) Feature superset .
$(ParentName)
The name of the item that contains this item . The name will be the parent folder name or the project name .
$(RootNameSpace)
Contains the namespace of the application ( If there is ).
$(IntDir)
The directory path specified for the intermediate file relative to the project directory . It translates into “ Intermediate Directory ” The value of the property .
$(OutDir)
The path to the output file directory , Relative to the project directory . This resolves to “ The output directory ” The value of the property .
$(DevEnvDir)
Visual Studio .NET Installation directory ( Definition form : Driver + route ); Including backslashes at the end “\”.
$(InputDir)
Enter the directory of the file ( Definition form : Driver + route ); Including backslashes at the end “\”. If the item is input , Then this macro is equivalent to $(ProjectDir).
$(InputPath)
Enter the absolute pathname of the file ( Definition form : Driver + route + Basic name + File extension ). If the item is input , Then this macro is equivalent to $(ProjectPath).
$(InputName)
Enter the basic name of the file . If the item is input , Then this macro is equivalent to $(ProjectName).
$(InputFileName)
Enter the file name of the file ( Defined as the base name + File extension ). If the item is input , Then this macro is equivalent to $(ProjectFileName).
$(InputExt)
Enter the file extension of the file . It includes... Before the file extension “.”. If the item is input , Then this macro is equivalent to $(ProjectExt).
$(ProjectDir)
Project directory ( Definition form : Driver + route ); Including backslashes at the end “\”.
$(ProjectPath)
The absolute pathname of the project ( Definition form : Driver + route + Basic name + File extension ).
$(ProjectName)
The basic name of the project .
$(ProjectFileName)
The file name of the project ( Defined as the base name + File extension ).
$(ProjectExt)
The file extension of the project . It includes... Before the file extension “.”.
$(SolutionDir)
Directory of solutions ( Definition form : Driver + route ); Including backslashes at the end “\”.
$(SolutionPath)
The absolute pathname of the solution ( Definition form : Driver + route + Basic name + File extension ).
$(SolutionName)
The basic name of the solution .
$(SolutionFileName)
File name of the solution ( Defined as the base name + File extension ).
$(SolutionExt)
File extension of the solution . It includes... Before the file extension “.”.
$(TargetDir)
The directory of the generated main output file ( Definition form : Driver + route ); Including backslashes at the end “\”.
$(TargetPath)
Absolute pathname of the generated main output file ( Definition form : Driver + route + Basic name + File extension ).
$(TargetName)
The base name of the generated main output file .
$(TargetFileName)
The file name of the generated main output file ( Defined as the base name + File extension ).
$(TargetExt)
The file extension of the generated main output file . It includes... Before the file extension “.”.
$(VSInstallDir)
install Visual Studio .NET The catalog of .
$(VCInstallDir)
install Visual C++ .NET The catalog of .
$(FrameworkDir)
install .NET Framework The catalog of .
$(FrameworkVersion)
Visual Studio The use of .NET Framework edition . And $(FrameworkDir) Combination , Namely Visual Studio The use of .NET Framework The full path of the version .
$(FrameworkSDKDir)
install .NET Framework SDK The catalog of ..NET Framework SDK Can be used as Visual Studio .NET Part of the installation , It can also be installed separately .
$(WebDeployPath)
from Web The relative path from the deployment root to where the project output belongs . Return and RelativePath The same value .
$(WebDeployRoot)
Point to <localhost> Absolute path of location . for example ,c:\inetpub\wwwroot.
$(SafeParentName)
The name of the immediate parent of a valid name format . for example , Form is .resx The parent of the file .
$(SafeInputName)
The name of the file as a valid class name , But not including the file extension .
$(SafeRootNamespace)
The project wizard will add the namespace name of the code . This namespace name will only be included in valid C++ Characters allowed in identifier .
$(FxCopDir)
fxcop.cmd Path to file .fxcop.cmd The file is not all Visual C++ Version installed with .
source :http://www.cnblogs.com/lidabo/archive/2012/05/29/2524170.html
边栏推荐
- About the error of installing PIP3 install chatterbot
- PAT 乙等 1017 C语言
- jvm-02. Guarantee of orderliness
- The digital collection market has just begun
- ORB_SLAM2运行
- PAT 乙等 1013 C语言
- AHA C language Chapter 8 game time is up (lesson 29)
- Pat class B 1016 C language
- Real MySQL interview questions (XXVII) -- Classification of users by RFM analysis method
- Work accumulation - judge whether GPS is on
猜你喜欢

Kotlin Android simple activity jump, simple combination of handler and thread

Real MySQL interview questions (XXVII) -- Classification of users by RFM analysis method

Centos7 deploy radius service -freeradius-3.0.13-15 EL7 integrating MySQL

Kotlin android简单Activity跳转、handler和thread简单配合使用

【Cocos2d-x】截图分享功能

【开源项目】excel导出lua配置表工具

技术开发团队视角看到的数字藏品机遇与挑战

Visual Studio调试技巧

Data migration from dolphin scheduler 1.2.1 to dolphin scheduler 2.0.5 and data test records after migration

【Cocos2d-x】可擦除的Layer:ErasableLayer
随机推荐
PAT 乙等 1023 组个最小数
matplotlib savefig多个图片叠加问题
Use of visdom
PAT 乙等 1020.月饼
PAT 乙等 1014 C语言
Real MySQL interview question (23) -- pinduoduo ball game analysis
三项最高级认证,两项创新技术、两大优秀案例,阿里云亮相云原生产业大会
jvm-03.jvm内存模型
PAT 乙等 1021 个位数统计
Pyinstaller sklearn报错的问题
MySQL character set
Heimdall database proxy scale out 20 times
TCP/IP 详解(第 2 版) 笔记 / 3 链路层 / 3.3 全双工, 节能, 自动协商机制, 802.1X 流控制 / 3.3.3 链路层流量控制
Real MySQL interview questions (25) -- common group comparison scenarios
SQL表名与函数名相同导致SQL语句错误。
数字藏品如何赋能经济实体?
编址和编址单位
gplearn出现 assignment destination is read-only
工作积累-判断GPS是否打开
Operating mongodb in node