0

전 처리 또는 어셈블리 출력을 한 번 클릭하여 검사 할 수 있습니다. 파일 속성을 열고, 각각의 설정을 변경하고, 컴파일하고, obj 디렉토리로 이동하여 결과 파일을 직접 열어 두는 것이 지루합니다.전처리 또는 어셈블리 출력을 빠르게 볼 수있는 VS 추가 기능

누군가이 Visual Studio 추가 기능, 매크로 또는이 작업을 자동화하는 모든 기능을 알고 있습니까?

답변

0

편집 : VS 11 +위한 확장 내가 좋은 매크로를 작성하여 그것을 자신을 해결 https://github.com/Trass3r/DevUtils

@ 사용할 수 있습니다. 그것은 방법보다 정교한입니다 만, 기본적으로 다음과 같이 작동

Imports EnvDTE 
Imports Microsoft.VisualStudio.VCProjectEngine 

Dim doc As EnvDTE.Document = DTE.ActiveDocument 
Dim prj As VCProject = doc.ProjectItem.ContainingProject.Object 

Dim file As VCFile = prj.Files.Item(doc.Name) 
Dim fileconfigs As IVCCollection = file.FileConfigurations 
Dim fileconfig As VCFileConfiguration = fileconfigs.Item("Release|x64") 
Dim tool As VCCLCompilerTool = fileconfig.Tool 

Dim asmFile = System.IO.Path.GetTempFileName + ".asm" 
tool.WholeProgramOptimization = False 
tool.AssemblerOutput = asmListingOption.asmListingAsmSrc 
tool.AssemblerListingLocation = asmFile 

fileconfig.Compile(True, True) 
Dim window = DTE.ItemOperations.OpenFile(asmFile, Constants.vsViewKindCode) 

AsmHighlighter와 함께 매우 유용합니다.

선행 처리 파일은

tool.GeneratePreprocessedFile = preprocessOption.preprocessYes 
' there's no separate option for this, so misuse /Fo 
tool.ObjectFile = System.IO.Path.GetTempFileName + ".cpp" 
과 유사하게 생성 할 수