-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from dotnetcore/any
增加编译选项,修复调试BUG
- Loading branch information
Showing
10 changed files
with
209 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/Natasha.CSharp/Natasha.CSharp.Compiler/Public/Component/Compiler/Model/DebugOutput.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
| ||
using Microsoft.CodeAnalysis.Emit; | ||
|
||
public class DebugOutput | ||
{ | ||
|
||
internal DebugInformationFormat _informationFormat = DebugInformationFormat.PortablePdb; | ||
|
||
/// <summary> | ||
/// 采用文件加载方式搜集源代码信息 | ||
/// </summary> | ||
/// <returns></returns> | ||
public DebugOutput WriteToFile() | ||
{ | ||
_informationFormat = DebugInformationFormat.PortablePdb; | ||
return this; | ||
} | ||
/// <summary> | ||
/// 将Pdb输出到程序集中,并直接从程序集加载Pdb调试信息 | ||
/// </summary> | ||
/// <returns></returns> | ||
public DebugOutput WriteToAssembly() | ||
{ | ||
_informationFormat = DebugInformationFormat.Embedded; | ||
return this; | ||
} | ||
|
||
} | ||
|
Oops, something went wrong.