[debugger] debugger client/server and sources listing implementation
Implements a udp client/server for communication between the debugger app and the Unity editor, to query information directly without having to rely on sdb being attached. This is based on a rewrite of the completion service client/server udp implementation. Implements sources listing, for inspection and breakpoint setting before the debugger is attached.
This commit is contained in:
Родитель
d67ad00fe1
Коммит
bdfcd015de
|
@ -106,6 +106,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Services", "Services", "{83
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeEditor.Remoting.Completion", "src\Services\CodeEditor.Remoting.Completion\CodeEditor.Remoting.Completion.csproj", "{D5A79034-8547-44FD-98F2-0E8869C7D742}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeEditor.Remoting.Tests", "src\Tests\CodeEditor.Remoting.Tests\CodeEditor.Remoting.Tests.csproj", "{126A5797-8647-4140-9EE9-99D5BBA75666}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -114,171 +116,205 @@ Global
|
|||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{80FD90AA-4188-4D81-AB31-6CDF792A84FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{80FD90AA-4188-4D81-AB31-6CDF792A84FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{80FD90AA-4188-4D81-AB31-6CDF792A84FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{80FD90AA-4188-4D81-AB31-6CDF792A84FA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{80FD90AA-4188-4D81-AB31-6CDF792A84FA}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{80FD90AA-4188-4D81-AB31-6CDF792A84FA}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{81C749CC-09BF-4F72-B9C7-93D8446360DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{81C749CC-09BF-4F72-B9C7-93D8446360DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{81C749CC-09BF-4F72-B9C7-93D8446360DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{81C749CC-09BF-4F72-B9C7-93D8446360DF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{81C749CC-09BF-4F72-B9C7-93D8446360DF}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{81C749CC-09BF-4F72-B9C7-93D8446360DF}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{6EBD7F15-9B34-49BA-B50B-1AC51527D085}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6EBD7F15-9B34-49BA-B50B-1AC51527D085}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6EBD7F15-9B34-49BA-B50B-1AC51527D085}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6EBD7F15-9B34-49BA-B50B-1AC51527D085}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6EBD7F15-9B34-49BA-B50B-1AC51527D085}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6EBD7F15-9B34-49BA-B50B-1AC51527D085}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{07D07B75-A60C-4063-8A0B-5A2F3C84490F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{07D07B75-A60C-4063-8A0B-5A2F3C84490F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{07D07B75-A60C-4063-8A0B-5A2F3C84490F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{07D07B75-A60C-4063-8A0B-5A2F3C84490F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{07D07B75-A60C-4063-8A0B-5A2F3C84490F}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{07D07B75-A60C-4063-8A0B-5A2F3C84490F}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{A6107081-C1F6-4B9C-AFED-2BE0AB8E5BAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A6107081-C1F6-4B9C-AFED-2BE0AB8E5BAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A6107081-C1F6-4B9C-AFED-2BE0AB8E5BAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A6107081-C1F6-4B9C-AFED-2BE0AB8E5BAF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A6107081-C1F6-4B9C-AFED-2BE0AB8E5BAF}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A6107081-C1F6-4B9C-AFED-2BE0AB8E5BAF}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{E563745A-460A-4FBF-A72B-B2D4492A9716}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E563745A-460A-4FBF-A72B-B2D4492A9716}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E563745A-460A-4FBF-A72B-B2D4492A9716}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E563745A-460A-4FBF-A72B-B2D4492A9716}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E563745A-460A-4FBF-A72B-B2D4492A9716}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E563745A-460A-4FBF-A72B-B2D4492A9716}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{6A91E197-9142-40C7-8C24-A75E8709E26D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6A91E197-9142-40C7-8C24-A75E8709E26D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6A91E197-9142-40C7-8C24-A75E8709E26D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A91E197-9142-40C7-8C24-A75E8709E26D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6A91E197-9142-40C7-8C24-A75E8709E26D}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A91E197-9142-40C7-8C24-A75E8709E26D}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{5D6AABD6-B4E6-4D84-96E1-A9DD15F874A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5D6AABD6-B4E6-4D84-96E1-A9DD15F874A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5D6AABD6-B4E6-4D84-96E1-A9DD15F874A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5D6AABD6-B4E6-4D84-96E1-A9DD15F874A8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5D6AABD6-B4E6-4D84-96E1-A9DD15F874A8}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5D6AABD6-B4E6-4D84-96E1-A9DD15F874A8}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{C290F98D-894E-4878-AE4A-D1E83DA95619}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C290F98D-894E-4878-AE4A-D1E83DA95619}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C290F98D-894E-4878-AE4A-D1E83DA95619}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C290F98D-894E-4878-AE4A-D1E83DA95619}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C290F98D-894E-4878-AE4A-D1E83DA95619}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C290F98D-894E-4878-AE4A-D1E83DA95619}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{B339EC21-C05C-4350-A62B-7126C82541AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B339EC21-C05C-4350-A62B-7126C82541AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B339EC21-C05C-4350-A62B-7126C82541AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B339EC21-C05C-4350-A62B-7126C82541AF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B339EC21-C05C-4350-A62B-7126C82541AF}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B339EC21-C05C-4350-A62B-7126C82541AF}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{6441A270-0DF3-42C9-9409-02BC273507DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6441A270-0DF3-42C9-9409-02BC273507DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6441A270-0DF3-42C9-9409-02BC273507DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6441A270-0DF3-42C9-9409-02BC273507DA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6441A270-0DF3-42C9-9409-02BC273507DA}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6441A270-0DF3-42C9-9409-02BC273507DA}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{36C4B51C-F8C9-44EB-832E-82E14FA63499}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{36C4B51C-F8C9-44EB-832E-82E14FA63499}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{36C4B51C-F8C9-44EB-832E-82E14FA63499}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{36C4B51C-F8C9-44EB-832E-82E14FA63499}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{36C4B51C-F8C9-44EB-832E-82E14FA63499}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{36C4B51C-F8C9-44EB-832E-82E14FA63499}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{0E6DFD1C-426E-4F74-AD5B-D908458B3D7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0E6DFD1C-426E-4F74-AD5B-D908458B3D7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0E6DFD1C-426E-4F74-AD5B-D908458B3D7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0E6DFD1C-426E-4F74-AD5B-D908458B3D7B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0E6DFD1C-426E-4F74-AD5B-D908458B3D7B}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0E6DFD1C-426E-4F74-AD5B-D908458B3D7B}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{E7D6952B-DC82-4D01-BFA6-D6BA4A65CEB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E7D6952B-DC82-4D01-BFA6-D6BA4A65CEB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E7D6952B-DC82-4D01-BFA6-D6BA4A65CEB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E7D6952B-DC82-4D01-BFA6-D6BA4A65CEB2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E7D6952B-DC82-4D01-BFA6-D6BA4A65CEB2}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E7D6952B-DC82-4D01-BFA6-D6BA4A65CEB2}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{05848CF0-F1ED-4806-8A06-62B7AD048BE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{05848CF0-F1ED-4806-8A06-62B7AD048BE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{05848CF0-F1ED-4806-8A06-62B7AD048BE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{05848CF0-F1ED-4806-8A06-62B7AD048BE7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{05848CF0-F1ED-4806-8A06-62B7AD048BE7}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{05848CF0-F1ED-4806-8A06-62B7AD048BE7}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{367AD6BB-75DA-4B31-ADD9-E89F5E02BA45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{367AD6BB-75DA-4B31-ADD9-E89F5E02BA45}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{367AD6BB-75DA-4B31-ADD9-E89F5E02BA45}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{367AD6BB-75DA-4B31-ADD9-E89F5E02BA45}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{367AD6BB-75DA-4B31-ADD9-E89F5E02BA45}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{367AD6BB-75DA-4B31-ADD9-E89F5E02BA45}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{3C524BBD-42F2-4BF2-A96A-329A8C76F7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3C524BBD-42F2-4BF2-A96A-329A8C76F7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3C524BBD-42F2-4BF2-A96A-329A8C76F7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3C524BBD-42F2-4BF2-A96A-329A8C76F7F9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3C524BBD-42F2-4BF2-A96A-329A8C76F7F9}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3C524BBD-42F2-4BF2-A96A-329A8C76F7F9}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{796B13D9-48B9-4EBA-B274-BBF297AFBD66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{796B13D9-48B9-4EBA-B274-BBF297AFBD66}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{796B13D9-48B9-4EBA-B274-BBF297AFBD66}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{796B13D9-48B9-4EBA-B274-BBF297AFBD66}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{796B13D9-48B9-4EBA-B274-BBF297AFBD66}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{796B13D9-48B9-4EBA-B274-BBF297AFBD66}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{F3B4F98B-CC7D-4E3F-A8B6-FEA8E8C4A078}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F3B4F98B-CC7D-4E3F-A8B6-FEA8E8C4A078}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F3B4F98B-CC7D-4E3F-A8B6-FEA8E8C4A078}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F3B4F98B-CC7D-4E3F-A8B6-FEA8E8C4A078}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F3B4F98B-CC7D-4E3F-A8B6-FEA8E8C4A078}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F3B4F98B-CC7D-4E3F-A8B6-FEA8E8C4A078}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{9DB8BFD3-06C8-4A8C-8842-5931B924B56C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9DB8BFD3-06C8-4A8C-8842-5931B924B56C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9DB8BFD3-06C8-4A8C-8842-5931B924B56C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9DB8BFD3-06C8-4A8C-8842-5931B924B56C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9DB8BFD3-06C8-4A8C-8842-5931B924B56C}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9DB8BFD3-06C8-4A8C-8842-5931B924B56C}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{489773FF-92B1-40B0-98EF-3ED337E5448F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{489773FF-92B1-40B0-98EF-3ED337E5448F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{489773FF-92B1-40B0-98EF-3ED337E5448F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{489773FF-92B1-40B0-98EF-3ED337E5448F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{489773FF-92B1-40B0-98EF-3ED337E5448F}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{489773FF-92B1-40B0-98EF-3ED337E5448F}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{A4F64CB6-1002-4CA6-8571-8ABFBDE63877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A4F64CB6-1002-4CA6-8571-8ABFBDE63877}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A4F64CB6-1002-4CA6-8571-8ABFBDE63877}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A4F64CB6-1002-4CA6-8571-8ABFBDE63877}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A4F64CB6-1002-4CA6-8571-8ABFBDE63877}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A4F64CB6-1002-4CA6-8571-8ABFBDE63877}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{59F47162-813F-47E0-9E62-99090D2081C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{59F47162-813F-47E0-9E62-99090D2081C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{59F47162-813F-47E0-9E62-99090D2081C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{59F47162-813F-47E0-9E62-99090D2081C1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{59F47162-813F-47E0-9E62-99090D2081C1}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{59F47162-813F-47E0-9E62-99090D2081C1}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{C8831BDA-0DB4-45FF-AB6D-DAE3F68D6CEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C8831BDA-0DB4-45FF-AB6D-DAE3F68D6CEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C8831BDA-0DB4-45FF-AB6D-DAE3F68D6CEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C8831BDA-0DB4-45FF-AB6D-DAE3F68D6CEF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C8831BDA-0DB4-45FF-AB6D-DAE3F68D6CEF}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C8831BDA-0DB4-45FF-AB6D-DAE3F68D6CEF}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{02E4A566-1A0F-4C5A-8949-6B8E0398497F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{02E4A566-1A0F-4C5A-8949-6B8E0398497F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{02E4A566-1A0F-4C5A-8949-6B8E0398497F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{02E4A566-1A0F-4C5A-8949-6B8E0398497F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{02E4A566-1A0F-4C5A-8949-6B8E0398497F}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{02E4A566-1A0F-4C5A-8949-6B8E0398497F}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{55006E6E-9E07-4C4C-94A9-6F8A6F235FFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{55006E6E-9E07-4C4C-94A9-6F8A6F235FFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{55006E6E-9E07-4C4C-94A9-6F8A6F235FFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{55006E6E-9E07-4C4C-94A9-6F8A6F235FFC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{55006E6E-9E07-4C4C-94A9-6F8A6F235FFC}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{55006E6E-9E07-4C4C-94A9-6F8A6F235FFC}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{DF4E0C96-8013-497D-8B45-37D71A3A9FBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DF4E0C96-8013-497D-8B45-37D71A3A9FBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DF4E0C96-8013-497D-8B45-37D71A3A9FBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DF4E0C96-8013-497D-8B45-37D71A3A9FBC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DF4E0C96-8013-497D-8B45-37D71A3A9FBC}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DF4E0C96-8013-497D-8B45-37D71A3A9FBC}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{2ED73522-E34D-4CAB-8A42-6421FB9B1E77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2ED73522-E34D-4CAB-8A42-6421FB9B1E77}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2ED73522-E34D-4CAB-8A42-6421FB9B1E77}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2ED73522-E34D-4CAB-8A42-6421FB9B1E77}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2ED73522-E34D-4CAB-8A42-6421FB9B1E77}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2ED73522-E34D-4CAB-8A42-6421FB9B1E77}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{3EBF45F9-8587-425F-A438-D699488850BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3EBF45F9-8587-425F-A438-D699488850BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3EBF45F9-8587-425F-A438-D699488850BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3EBF45F9-8587-425F-A438-D699488850BB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3EBF45F9-8587-425F-A438-D699488850BB}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3EBF45F9-8587-425F-A438-D699488850BB}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{883E3104-4C05-4E8B-8043-21D2BED9CB65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{883E3104-4C05-4E8B-8043-21D2BED9CB65}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{883E3104-4C05-4E8B-8043-21D2BED9CB65}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{883E3104-4C05-4E8B-8043-21D2BED9CB65}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{883E3104-4C05-4E8B-8043-21D2BED9CB65}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{883E3104-4C05-4E8B-8043-21D2BED9CB65}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{6B6B0AB2-0DA0-40F8-A56D-C6CC1CADEF16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6B6B0AB2-0DA0-40F8-A56D-C6CC1CADEF16}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6B6B0AB2-0DA0-40F8-A56D-C6CC1CADEF16}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6B6B0AB2-0DA0-40F8-A56D-C6CC1CADEF16}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6B6B0AB2-0DA0-40F8-A56D-C6CC1CADEF16}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6B6B0AB2-0DA0-40F8-A56D-C6CC1CADEF16}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{0EF8B173-6B19-4812-A8D0-ADE5F7651C4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0EF8B173-6B19-4812-A8D0-ADE5F7651C4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0EF8B173-6B19-4812-A8D0-ADE5F7651C4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0EF8B173-6B19-4812-A8D0-ADE5F7651C4A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0EF8B173-6B19-4812-A8D0-ADE5F7651C4A}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0EF8B173-6B19-4812-A8D0-ADE5F7651C4A}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{1318FD98-D715-47F2-B3E7-74E12F042114}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1318FD98-D715-47F2-B3E7-74E12F042114}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1318FD98-D715-47F2-B3E7-74E12F042114}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1318FD98-D715-47F2-B3E7-74E12F042114}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1318FD98-D715-47F2-B3E7-74E12F042114}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1318FD98-D715-47F2-B3E7-74E12F042114}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{E169204B-D59F-4CDA-A0A9-CBCEF7F538B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E169204B-D59F-4CDA-A0A9-CBCEF7F538B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E169204B-D59F-4CDA-A0A9-CBCEF7F538B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E169204B-D59F-4CDA-A0A9-CBCEF7F538B3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E169204B-D59F-4CDA-A0A9-CBCEF7F538B3}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -289,20 +325,29 @@ Global
|
|||
{F2D07F82-9C51-4889-8987-4CEF47490751}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F2D07F82-9C51-4889-8987-4CEF47490751}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{F0499708-3EB6-4026-8362-97E6FFC4E7C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F0499708-3EB6-4026-8362-97E6FFC4E7C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F0499708-3EB6-4026-8362-97E6FFC4E7C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F0499708-3EB6-4026-8362-97E6FFC4E7C8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F0499708-3EB6-4026-8362-97E6FFC4E7C8}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F0499708-3EB6-4026-8362-97E6FFC4E7C8}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{016C8D73-3641-47FB-8D33-7A015A7EC7DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{016C8D73-3641-47FB-8D33-7A015A7EC7DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{016C8D73-3641-47FB-8D33-7A015A7EC7DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{016C8D73-3641-47FB-8D33-7A015A7EC7DB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{016C8D73-3641-47FB-8D33-7A015A7EC7DB}.Testing|Any CPU.ActiveCfg = Testing|Any CPU
|
||||
{016C8D73-3641-47FB-8D33-7A015A7EC7DB}.Testing|Any CPU.Build.0 = Testing|Any CPU
|
||||
{D5A79034-8547-44FD-98F2-0E8869C7D742}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D5A79034-8547-44FD-98F2-0E8869C7D742}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D5A79034-8547-44FD-98F2-0E8869C7D742}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D5A79034-8547-44FD-98F2-0E8869C7D742}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D5A79034-8547-44FD-98F2-0E8869C7D742}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D5A79034-8547-44FD-98F2-0E8869C7D742}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
{126A5797-8647-4140-9EE9-99D5BBA75666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{126A5797-8647-4140-9EE9-99D5BBA75666}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{126A5797-8647-4140-9EE9-99D5BBA75666}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{126A5797-8647-4140-9EE9-99D5BBA75666}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{126A5797-8647-4140-9EE9-99D5BBA75666}.Testing|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{126A5797-8647-4140-9EE9-99D5BBA75666}.Testing|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -313,6 +358,12 @@ Global
|
|||
{DF4E0C96-8013-497D-8B45-37D71A3A9FBC} = {DECCCF77-91AC-4759-9B42-AD5D72496990}
|
||||
{883E3104-4C05-4E8B-8043-21D2BED9CB65} = {DECCCF77-91AC-4759-9B42-AD5D72496990}
|
||||
{6B6B0AB2-0DA0-40F8-A56D-C6CC1CADEF16} = {DECCCF77-91AC-4759-9B42-AD5D72496990}
|
||||
{1318FD98-D715-47F2-B3E7-74E12F042114} = {DECCCF77-91AC-4759-9B42-AD5D72496990}
|
||||
{55006E6E-9E07-4C4C-94A9-6F8A6F235FFC} = {DECCCF77-91AC-4759-9B42-AD5D72496990}
|
||||
{2ED73522-E34D-4CAB-8A42-6421FB9B1E77} = {DECCCF77-91AC-4759-9B42-AD5D72496990}
|
||||
{0EF8B173-6B19-4812-A8D0-ADE5F7651C4A} = {DECCCF77-91AC-4759-9B42-AD5D72496990}
|
||||
{A4F64CB6-1002-4CA6-8571-8ABFBDE63877} = {DECCCF77-91AC-4759-9B42-AD5D72496990}
|
||||
{126A5797-8647-4140-9EE9-99D5BBA75666} = {DECCCF77-91AC-4759-9B42-AD5D72496990}
|
||||
{6441A270-0DF3-42C9-9409-02BC273507DA} = {950B8E62-DD5C-4084-B4C2-42B3BAEBC001}
|
||||
{36C4B51C-F8C9-44EB-832E-82E14FA63499} = {950B8E62-DD5C-4084-B4C2-42B3BAEBC001}
|
||||
{A3FC73DA-C47F-4E97-BBE0-EACE720D3614} = {950B8E62-DD5C-4084-B4C2-42B3BAEBC001}
|
||||
|
@ -323,17 +374,11 @@ Global
|
|||
{24D895E6-E40E-4106-918A-7FB98DE60E3D} = {950B8E62-DD5C-4084-B4C2-42B3BAEBC001}
|
||||
{9DB8BFD3-06C8-4A8C-8842-5931B924B56C} = {228395CA-7F86-451E-B8B7-8415EEB77AD7}
|
||||
{489773FF-92B1-40B0-98EF-3ED337E5448F} = {228395CA-7F86-451E-B8B7-8415EEB77AD7}
|
||||
{A4F64CB6-1002-4CA6-8571-8ABFBDE63877} = {228395CA-7F86-451E-B8B7-8415EEB77AD7}
|
||||
{59F47162-813F-47E0-9E62-99090D2081C1} = {228395CA-7F86-451E-B8B7-8415EEB77AD7}
|
||||
{2ED73522-E34D-4CAB-8A42-6421FB9B1E77} = {228395CA-7F86-451E-B8B7-8415EEB77AD7}
|
||||
{0EF8B173-6B19-4812-A8D0-ADE5F7651C4A} = {228395CA-7F86-451E-B8B7-8415EEB77AD7}
|
||||
{80FD90AA-4188-4D81-AB31-6CDF792A84FA} = {8E77EF12-1E3A-4BF1-A01A-B7E35F68E7F1}
|
||||
{81C749CC-09BF-4F72-B9C7-93D8446360DF} = {8E77EF12-1E3A-4BF1-A01A-B7E35F68E7F1}
|
||||
{6EBD7F15-9B34-49BA-B50B-1AC51527D085} = {8E77EF12-1E3A-4BF1-A01A-B7E35F68E7F1}
|
||||
{07D07B75-A60C-4063-8A0B-5A2F3C84490F} = {8E77EF12-1E3A-4BF1-A01A-B7E35F68E7F1}
|
||||
{F3B4F98B-CC7D-4E3F-A8B6-FEA8E8C4A078} = {8E77EF12-1E3A-4BF1-A01A-B7E35F68E7F1}
|
||||
{55006E6E-9E07-4C4C-94A9-6F8A6F235FFC} = {8E77EF12-1E3A-4BF1-A01A-B7E35F68E7F1}
|
||||
{1318FD98-D715-47F2-B3E7-74E12F042114} = {8E77EF12-1E3A-4BF1-A01A-B7E35F68E7F1}
|
||||
{E563745A-460A-4FBF-A72B-B2D4492A9716} = {07FA612B-910F-474F-942D-50E6230A85E0}
|
||||
{6A91E197-9142-40C7-8C24-A75E8709E26D} = {07FA612B-910F-474F-942D-50E6230A85E0}
|
||||
{5D6AABD6-B4E6-4D84-96E1-A9DD15F874A8} = {07FA612B-910F-474F-942D-50E6230A85E0}
|
||||
|
@ -350,5 +395,6 @@ Global
|
|||
{F0499708-3EB6-4026-8362-97E6FFC4E7C8} = {68A06037-F9D6-407C-A971-793850A7E855}
|
||||
{016C8D73-3641-47FB-8D33-7A015A7EC7DB} = {68A06037-F9D6-407C-A971-793850A7E855}
|
||||
{D5A79034-8547-44FD-98F2-0E8869C7D742} = {83D71823-7161-4836-9324-3C4C52329684}
|
||||
{F3B4F98B-CC7D-4E3F-A8B6-FEA8E8C4A078} = {83D71823-7161-4836-9324-3C4C52329684}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/BLANK_LINES_AROUND_SINGLE_LINE_INVOCABLE/@EntryValue">1</s:Int64>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SIMPLE_EMBEDDED_STATEMENT_STYLE/@EntryValue">LINE_BREAK</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_WHILE_ON_NEW_LINE/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_EMPTY_METHOD_CALL_PARENTHESES/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_EMPTY_METHOD_PARENTHESES/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_METHOD_CALL_PARENTHESES/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_METHOD_PARENTHESES/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LINES/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_TYPEOF_PARENTHESES/@EntryValue">False</s:Boolean>
|
||||
|
|
|
@ -96,6 +96,7 @@
|
|||
<Compile Include="IFaces\IDebuggerSessionAssembler.cs" />
|
||||
<Compile Include="IFaces\IExecutingLocationProvider.cs" />
|
||||
<Compile Include="IFaces\ILocation.cs" />
|
||||
<Compile Include="IFaces\ISourcesProvider.cs" />
|
||||
<Compile Include="IFaces\IVirtualMachine.cs" />
|
||||
<Compile Include="IFaces\IThreadProvider.cs" />
|
||||
<Compile Include="IFaces\IBreakPoint.cs" />
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CodeEditor.Debugger
|
||||
{
|
||||
public interface ISourcesProvider
|
||||
{
|
||||
IList<string> Sources { get; }
|
||||
|
||||
void StartRefreshingSources(EventHandler callback, object state);
|
||||
void StopRefreshingSources();
|
||||
void Stop();
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
namespace CodeEditor.Debugger.Implementation
|
||||
{
|
||||
class Location : ILocation
|
||||
public class Location : ILocation
|
||||
{
|
||||
private static Location _default;
|
||||
public static Location Default { get { return _default; } }
|
||||
|
@ -28,5 +28,10 @@ namespace CodeEditor.Debugger.Implementation
|
|||
{
|
||||
get { return _file; }
|
||||
}
|
||||
|
||||
public static ILocation FromLocation (Mono.Debugger.Soft.Location location)
|
||||
{
|
||||
return new Location(location.LineNumber, location.SourceFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CodeEditor.Composition;
|
||||
using Mono.Debugger.Soft;
|
||||
using CodeEditor.Debugger.Implementation;
|
||||
using UnityEngine;
|
||||
using Event = Mono.Debugger.Soft.Event;
|
||||
using mds = Mono.Debugger.Soft;
|
||||
|
||||
namespace CodeEditor.Debugger.Unity.Engine
|
||||
{
|
||||
[Export(typeof(IDebuggerWindow))]
|
||||
public class CallStackDisplay : IDebuggerWindow
|
||||
public class CallStackDisplay : DebuggerWindow
|
||||
{
|
||||
private readonly IDebuggerSession _debuggingSession;
|
||||
private readonly ISourceNavigator _sourceNavigator;
|
||||
private IEnumerable<StackFrame> _callFrames = new StackFrame[0];
|
||||
private IEnumerable<mds.StackFrame> _callFrames = new mds.StackFrame[0];
|
||||
|
||||
[ImportingConstructor]
|
||||
public CallStackDisplay(IDebuggerSession debuggingSession, ISourceNavigator sourceNavigator)
|
||||
|
@ -23,12 +23,12 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
_sourceNavigator = sourceNavigator;
|
||||
}
|
||||
|
||||
private void VMGotSuspended(Event obj)
|
||||
private void VMGotSuspended (mds.Event obj)
|
||||
{
|
||||
SetCallFrames(_debuggingSession.GetMainThread().GetFrames());
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
public override void OnGUI ()
|
||||
{
|
||||
GUI.enabled = _debuggingSession.Suspended;
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
foreach(var frame in _callFrames)
|
||||
{
|
||||
if (GUILayout.Button(frame.Method.DeclaringType.Name+"."+frame.Method.Name + " : " + frame.Location.LineNumber))
|
||||
_sourceNavigator.ShowSourceLocation(frame.Location);
|
||||
_sourceNavigator.ShowSourceLocation(Location.FromLocation(frame.Location));
|
||||
}
|
||||
if (!_callFrames.Any())
|
||||
GUILayout.Label("No stackframes on this threads stack");
|
||||
|
@ -45,12 +45,12 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
GUI.skin.button.alignment = backup;
|
||||
}
|
||||
|
||||
public string Title
|
||||
public override string Title
|
||||
{
|
||||
get { return "CallStack"; }
|
||||
}
|
||||
|
||||
public void SetCallFrames(IEnumerable<StackFrame> frames)
|
||||
public void SetCallFrames (IEnumerable<mds.StackFrame> frames)
|
||||
{
|
||||
_callFrames = frames;
|
||||
}
|
||||
|
|
|
@ -60,11 +60,13 @@
|
|||
<Compile Include="BreakPointMargin.cs" />
|
||||
<Compile Include="BreakPointMarginProvider.cs" />
|
||||
<Compile Include="CallStackDisplay.cs" />
|
||||
<Compile Include="DebuggerWindow.cs" />
|
||||
<Compile Include="ExecutingLineAdornment.cs" />
|
||||
<Compile Include="LogWindow.cs" />
|
||||
<Compile Include="DebuggerWindowManager.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SourceNavigator.cs" />
|
||||
<Compile Include="SourcesWindow.cs" />
|
||||
<Compile Include="SourceWindow.cs" />
|
||||
<Compile Include="TextViewAppearanceProvider.cs" />
|
||||
<Compile Include="ThreadsDisplay.cs" />
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CodeEditor.Debugger.Unity.Engine
|
||||
{
|
||||
public class DebuggerWindow : IDebuggerWindow
|
||||
{
|
||||
public static Rect Default = new Rect(0, 0, 0, 0);
|
||||
private Rect _rect;
|
||||
|
||||
public DebuggerWindow()
|
||||
{
|
||||
_rect = Default;
|
||||
}
|
||||
|
||||
public virtual void OnGUI ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual string Title
|
||||
{
|
||||
get { return ""; }
|
||||
}
|
||||
|
||||
public virtual Rect ViewPort
|
||||
{
|
||||
get { return _rect; }
|
||||
set { _rect = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CodeEditor.Composition;
|
||||
using UnityEngine;
|
||||
|
@ -9,6 +10,7 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
{
|
||||
void OnGUI();
|
||||
string Title { get; }
|
||||
Rect ViewPort { get; }
|
||||
}
|
||||
|
||||
[Export]
|
||||
|
@ -24,21 +26,48 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
[ImportingConstructor]
|
||||
public DebuggerWindowManager(ImportedWindows windows)
|
||||
{
|
||||
_windows = windows._importedWindows.ToList();
|
||||
_windows = windows._importedWindows.Where (w => w.ViewPort.Equals (DebuggerWindow.Default)).ToList ();
|
||||
_customWindows = windows._importedWindows.Where (w => !w.ViewPort.Equals (DebuggerWindow.Default)).ToList ();
|
||||
}
|
||||
|
||||
private readonly List<IDebuggerWindow> _windows;
|
||||
private readonly List<IDebuggerWindow> _customWindows;
|
||||
|
||||
public Rect ViewPort { get; set; }
|
||||
|
||||
public T Get<T>() where T:class
|
||||
{
|
||||
return (_windows.FirstOrDefault(w => w is T) ?? _customWindows.FirstOrDefault(w => w is T)) as T;
|
||||
}
|
||||
|
||||
public void Add(IDebuggerWindow debuggerWindow)
|
||||
{
|
||||
_windows.Add(debuggerWindow);
|
||||
if (debuggerWindow.ViewPort.Equals(DebuggerWindow.Default))
|
||||
_windows.Add(debuggerWindow);
|
||||
else
|
||||
_customWindows.Add (debuggerWindow);
|
||||
}
|
||||
|
||||
public void ResetWindows ()
|
||||
{
|
||||
_windows.AddRange(_customWindows);
|
||||
_customWindows.Clear();
|
||||
_customWindows.AddRange(_windows.Where (w => !w.ViewPort.Equals (DebuggerWindow.Default)));
|
||||
_windows.RemoveAll(w => !w.ViewPort.Equals(DebuggerWindow.Default));
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
GUILayout.BeginArea(ViewPort);
|
||||
foreach (var window in _customWindows)
|
||||
{
|
||||
GUI.enabled = true;
|
||||
GUILayout.BeginArea (window.ViewPort, window.Title, GUI.skin.window);
|
||||
window.OnGUI ();
|
||||
GUILayout.EndArea ();
|
||||
}
|
||||
|
||||
GUI.enabled = true;
|
||||
GUILayout.BeginArea (ViewPort);
|
||||
|
||||
int windowCount = _windows.Count();
|
||||
int gaps = windowCount - 1;
|
||||
|
@ -50,11 +79,12 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
foreach(var window in _windows)
|
||||
{
|
||||
GUI.enabled = true;
|
||||
GUILayout.BeginArea(rect, window.Title, GUI.skin.window);
|
||||
window.OnGUI();
|
||||
GUILayout.BeginArea (rect, window.Title, GUI.skin.window);
|
||||
window.OnGUI ();
|
||||
GUILayout.EndArea();
|
||||
rect.x = rect.x + width + gapwidth;
|
||||
}
|
||||
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
[Export]
|
||||
[Export(typeof(IDebuggerWindow))]
|
||||
[Export(typeof(ILogProvider))]
|
||||
public class LogWindow : IDebuggerWindow, ILogProvider
|
||||
public class LogWindow : DebuggerWindow, ILogProvider
|
||||
{
|
||||
private const int MaxLines = 200;
|
||||
private readonly ITextView _textView;
|
||||
|
@ -20,8 +20,9 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
_textView = viewFactory.CreateView();
|
||||
}
|
||||
|
||||
public Rect ViewPort
|
||||
public override Rect ViewPort
|
||||
{
|
||||
get { return _textView.ViewPort; }
|
||||
set { _textView.ViewPort = value; }
|
||||
}
|
||||
|
||||
|
@ -30,13 +31,13 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
_pendingLines.Enqueue(text);
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
public override void OnGUI ()
|
||||
{
|
||||
FlushPendingLines();
|
||||
_textView.OnGUI();
|
||||
}
|
||||
|
||||
public string Title
|
||||
public override string Title
|
||||
{
|
||||
get { return "Log"; }
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
{
|
||||
public interface ISourceNavigator
|
||||
{
|
||||
void ShowSourceLocation(Location location);
|
||||
void ShowSourceLocation(ILocation location);
|
||||
}
|
||||
|
||||
[Export(typeof(ISourceNavigator))]
|
||||
|
@ -15,7 +15,7 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
[Import]
|
||||
public SourceWindow SourceWindow { get; set; }
|
||||
|
||||
public void ShowSourceLocation(Location location)
|
||||
public void ShowSourceLocation(ILocation location)
|
||||
{
|
||||
if (!IsValidLocation(location))
|
||||
return;
|
||||
|
@ -23,7 +23,7 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
SourceWindow.ShowSourceLocation(location.SourceFile, location.LineNumber);
|
||||
}
|
||||
|
||||
private static bool IsValidLocation(Location location)
|
||||
private static bool IsValidLocation(ILocation location)
|
||||
{
|
||||
return location.LineNumber >= 1 && File.Exists(location.SourceFile);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@ using UnityEngine;
|
|||
namespace CodeEditor.Debugger.Unity.Engine
|
||||
{
|
||||
[Export]
|
||||
public class SourceWindow
|
||||
[Export (typeof (IDebuggerWindow))]
|
||||
public class SourceWindow : DebuggerWindow
|
||||
{
|
||||
private readonly ITextViewFactory _viewFactory;
|
||||
private ITextView _textView;
|
||||
|
@ -20,9 +21,7 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
_viewFactory = viewFactory;
|
||||
}
|
||||
|
||||
public Rect ViewPort { get; set; }
|
||||
|
||||
public void OnGUI()
|
||||
public override void OnGUI()
|
||||
{
|
||||
if (_pendingSourceLocation != null)
|
||||
{
|
||||
|
@ -50,5 +49,6 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
_pendingSourceLocation = sourceFile;
|
||||
_pendingSourceLine = lineNumber;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using CodeEditor.Composition;
|
||||
using CodeEditor.Debugger.Implementation;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CodeEditor.Debugger.Unity.Engine
|
||||
{
|
||||
[Export]
|
||||
[Export (typeof (IDebuggerWindow))]
|
||||
public class SourcesWindow : DebuggerWindow
|
||||
{
|
||||
private ISourcesProvider _provider;
|
||||
private ISourceNavigator _sourceNavigator;
|
||||
|
||||
[ImportingConstructor]
|
||||
public SourcesWindow(ISourcesProvider provider, ISourceNavigator sourceNavigator)
|
||||
{
|
||||
_provider = provider;
|
||||
_sourceNavigator = sourceNavigator;
|
||||
}
|
||||
|
||||
public override void OnGUI()
|
||||
{
|
||||
GUI.enabled = true;
|
||||
var backup = GUI.skin.button.alignment;
|
||||
GUI.skin.button.alignment = TextAnchor.MiddleLeft;
|
||||
|
||||
var files = new List<string> (_provider.Sources);
|
||||
foreach (var file in files)
|
||||
{
|
||||
if (GUILayout.Button(Path.GetFileName(file)))
|
||||
_sourceNavigator.ShowSourceLocation(new Location(1, file));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override string Title
|
||||
{
|
||||
get { return "Source files"; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ using Event = Mono.Debugger.Soft.Event;
|
|||
namespace CodeEditor.Debugger.Unity.Engine
|
||||
{
|
||||
[Export(typeof(IDebuggerWindow))]
|
||||
public class ThreadsDisplay : IDebuggerWindow
|
||||
public class ThreadsDisplay : DebuggerWindow
|
||||
{
|
||||
private readonly IDebuggerSession _debuggerSession;
|
||||
private IThreadProvider _threadProvider;
|
||||
|
@ -19,7 +19,7 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
_threadProvider = threadProvider;
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
public override void OnGUI()
|
||||
{
|
||||
GUI.enabled = _debuggerSession.Suspended;
|
||||
foreach(var thread in _threadProvider.Threads)
|
||||
|
@ -28,9 +28,9 @@ namespace CodeEditor.Debugger.Unity.Engine
|
|||
}
|
||||
}
|
||||
|
||||
public string Title
|
||||
public override string Title
|
||||
{
|
||||
get { return "Threads"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,14 @@
|
|||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>$(SolutionDir)libs\CodeEditor.Grammars.dll</HintPath>
|
||||
</Reference>
|
||||
<ProjectReference Include="..\..\Debugger\CodeEditor.Debugger.csproj">
|
||||
<Project>{6441A270-0DF3-42C9-9409-02BC273507DA}</Project>
|
||||
<Name>CodeEditor.Debugger</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Engine\CodeEditor.Debugger.Unity.Engine.csproj">
|
||||
<Project>{0E6DFD1C-426E-4F74-AD5B-D908458B3D7B}</Project>
|
||||
<Name>CodeEditor.Debugger.Unity.Engine</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Standalone\CodeEditor.Debugger.Unity.Standalone.csproj">
|
||||
<Project>{05848CF0-F1ED-4806-8A06-62B7AD048BE7}</Project>
|
||||
<Name>CodeEditor.Debugger.Unity.Standalone</Name>
|
||||
|
@ -142,147 +150,84 @@
|
|||
<UnityDebuggerDir>Data\Tools\Debugger\</UnityDebuggerDir>
|
||||
<UnityDebuggerDataDir>$(UnityDebuggerDir)Debugger_Data\Managed\</UnityDebuggerDataDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="AfterBuild" DependsOnTargets="BuildDebugger" />
|
||||
|
||||
<!-- Make sure all the assemblies are cleaned from the debugger dir as well -->
|
||||
<Target Name="AfterClean" DependsOnTargets="_ResolveOutputFiles">
|
||||
<Delete Files="@(_Files->'$(UnityBuildDir)$(UnityDebuggerDataDir)%(Filename)%(Extension)')" />
|
||||
</Target>
|
||||
|
||||
<!-- This target resolves all the assemblies that this project references directly or
|
||||
indirectly, excluding the UnityEngine.dll and UnityEditor.dll -->
|
||||
<Target Name="_ResolveOutputFiles" DependsOnTargets="_ResolvePaths">
|
||||
|
||||
<CreateItem
|
||||
Condition="'$(Configuration)' == 'Debug'"
|
||||
Include="$(OutDir)*.dll;$(OutDir)*.pdb"
|
||||
Exclude="$(OutDir)UnityEngine*;$(OutDir)UnityEditor*;$(OutDir)$(TargetFilename)">
|
||||
<CreateItem Condition="'$(Configuration)' == 'Debug'" Include="$(OutDir)*.dll;$(OutDir)*.pdb" Exclude="$(OutDir)UnityEngine*;$(OutDir)UnityEditor*;$(OutDir)$(TargetFilename)">
|
||||
<Output TaskParameter="Include" ItemName="_Files" />
|
||||
</CreateItem>
|
||||
|
||||
<CreateItem
|
||||
Condition="'$(Configuration)' != 'Debug'"
|
||||
Include="$(OutDir)*.dll"
|
||||
Exclude="$(OutDir)UnityEngine*;$(OutDir)UnityEditor*;$(OutDir)$(TargetFilename)">
|
||||
<CreateItem Condition="'$(Configuration)' != 'Debug'" Include="$(OutDir)*.dll" Exclude="$(OutDir)UnityEngine*;$(OutDir)UnityEditor*;$(OutDir)$(TargetFilename)">
|
||||
<Output TaskParameter="Include" ItemName="_Files" />
|
||||
</CreateItem>
|
||||
|
||||
<Message Text="@(_Files)" Importance="Low" />
|
||||
|
||||
</Target>
|
||||
|
||||
<!-- This target resolves all the debugger player files -->
|
||||
<Target Name="_ResolveOutputDebugger" DependsOnTargets="_ResolvePaths">
|
||||
<CreateItem Include="$(_ProjectAbsPath)$(UnityDebuggerProjectBuildDir)**">
|
||||
<Output TaskParameter="Include" ItemName="_DebuggerFiles" />
|
||||
</CreateItem>
|
||||
|
||||
<Message Text="Debugger Files: @(_DebuggerFiles)" Importance="Low" />
|
||||
</Target>
|
||||
|
||||
<!-- This target resolves full project and tool paths for the _BuildDebuggerProject target -->
|
||||
<Target Name="_ResolvePaths">
|
||||
|
||||
<!-- This allows us to later get the full path by doing %(UnityDebuggerProjectDir.FullPath) -->
|
||||
<CreateItem Include="..\Standalone\UnityProject\">
|
||||
<Output TaskParameter="Include" ItemName="UnityDebuggerProjectDir" />
|
||||
</CreateItem>
|
||||
|
||||
<CreateProperty Value="%(UnityDebuggerProjectDir.FullPath)">
|
||||
<Output TaskParameter="Value" PropertyName="_ProjectAbsPath" />
|
||||
</CreateProperty>
|
||||
|
||||
<CreateProperty Value="$(_ProjectAbsPath)$(UnityDebuggerProjectBuildDir)Debugger.app" Condition="'$(OS)'=='Unix'">
|
||||
<Output TaskParameter="Value" PropertyName="_DebuggerExe" />
|
||||
</CreateProperty>
|
||||
|
||||
<CreateProperty Value="$(_ProjectAbsPath)$(UnityDebuggerProjectBuildDir)Debugger.exe" Condition="'$(OS)'!='Unix'">
|
||||
<Output TaskParameter="Value" PropertyName="_DebuggerExe" />
|
||||
</CreateProperty>
|
||||
|
||||
<CreateProperty Value="$(UnityCmd) -buildOSXPlayer "$(_DebuggerExe)"" Condition="'$(OS)'=='Unix'">
|
||||
<Output TaskParameter="Value" PropertyName="_UnityCmd" />
|
||||
</CreateProperty>
|
||||
|
||||
<CreateProperty Value="$(UnityCmd) -buildWindowsPlayer "$(_DebuggerExe)"" Condition="'$(OS)'!='Unix'">
|
||||
<Output TaskParameter="Value" PropertyName="_UnityCmd" />
|
||||
</CreateProperty>
|
||||
|
||||
</Target>
|
||||
|
||||
|
||||
<!-- Take all the assemblies and copy them to the debugger dir,
|
||||
with dependency checks (only copies what's changed) -->
|
||||
<Target Name="_CopyDependenciesToDebuggerDir" DependsOnTargets="_ResolveOutputFiles"
|
||||
Inputs="@(_Files)" Outputs="@(_Files->'$(UnityBuildDir)$(UnityDebuggerDataDir)%(Filename)%(Extension)')">
|
||||
|
||||
<Target Name="_CopyDependenciesToDebuggerDir" DependsOnTargets="_ResolveOutputFiles" Inputs="@(_Files)" Outputs="@(_Files->'$(UnityBuildDir)$(UnityDebuggerDataDir)%(Filename)%(Extension)')">
|
||||
<MakeDir Directories="$(UnityBuildDir)$(UnityDebuggerDataDir)" />
|
||||
|
||||
<Copy
|
||||
SourceFiles="@(_Files)"
|
||||
DestinationFolder="$(UnityBuildDir)$(UnityDebuggerDataDir)"
|
||||
SkipUnchangedFiles="true" />
|
||||
<Copy SourceFiles="@(_Files)" DestinationFolder="$(UnityBuildDir)$(UnityDebuggerDataDir)" SkipUnchangedFiles="true" />
|
||||
<!-- Touch Files="@(_Files->'$(UnityBuildDir)$(UnityDebuggerDataDir)%(Filename)%(Extension)')" /-->
|
||||
</Target>
|
||||
|
||||
<Target Name="_SetupDebuggerProject" DependsOnTargets="_ResolveOutputFiles">
|
||||
|
||||
<!-- MakeDir Directories="$(_ProjectAbsPath)Project\Assets\bin" / -->
|
||||
<MakeDir Directories="$(_ProjectAbsPath)$(UnityDebuggerProjectBuildDir)" />
|
||||
|
||||
<ItemGroup>
|
||||
<_ToDelete
|
||||
Include="$(_ProjectAbsPath)Project\Assets\bin\*.dll;$(_ProjectAbsPath)Project\Assets\bin\*.pdb"
|
||||
Exclude="@(_Files->'$(_ProjectAbsPath)Project\Assets\bin\%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
/>
|
||||
<_ToDelete Include="$(_ProjectAbsPath)Project\Assets\bin\*.dll;$(_ProjectAbsPath)Project\Assets\bin\*.pdb" Exclude="@(_Files->'$(_ProjectAbsPath)Project\Assets\bin\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
</ItemGroup>
|
||||
|
||||
<Copy
|
||||
SourceFiles="@(_Files)"
|
||||
DestinationFolder="$(_ProjectAbsPath)Project\Assets\bin"
|
||||
SkipUnchangedFiles="true"/>
|
||||
|
||||
<Copy SourceFiles="@(_Files)" DestinationFolder="$(_ProjectAbsPath)Project\Assets\bin" SkipUnchangedFiles="true" />
|
||||
<Delete Files="@(_ToDelete)" />
|
||||
|
||||
</Target>
|
||||
|
||||
<!-- This target is called by the BuildDebuggerProject target. It builds the unity debugger
|
||||
project and deploys the result to the proper directories -->
|
||||
<Target Name="_BuildDebuggerProject" DependsOnTargets="_SetupDebuggerProject"
|
||||
Inputs="@(_Files)"
|
||||
Outputs="$(_DebuggerExe)">
|
||||
|
||||
<Target Name="_BuildDebuggerProject" DependsOnTargets="_SetupDebuggerProject" Inputs="@(_Files)" Outputs="$(_DebuggerExe)">
|
||||
<Exec Command="$(_UnityCmd) -batchmode -projectpath "$(_ProjectAbsPath)Project" -quit" />
|
||||
<Touch Files="$(_DebuggerExe)" />
|
||||
|
||||
<!-- Clean out files that aren't needed anymore -->
|
||||
<Delete Files="$(_ProjectAbsPath)$(UnityDebuggerProjectBuildDir)Debugger_Data\Managed\CodeEditor.*" />
|
||||
<Delete Files="$(_ProjectAbsPath)$(UnityDebuggerProjectBuildDir)Debugger_Data\Managed\Mono.Debugger.Soft.dll" />
|
||||
<Delete Files="$(_ProjectAbsPath)$(UnityDebuggerProjectBuildDir)Debugger_Data\Managed\Mono.Cecil.dll" />
|
||||
<Delete Files="$(_ProjectAbsPath)Project\Assets\bin" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_CopyDebuggerBuild" DependsOnTargets="_ResolveOutputFiles;_ResolveOutputDebugger"
|
||||
Inputs="@(_Files->'$(_ProjectAbsPath)Project\Assets\bin\%(RecursiveDir)%(Filename)%(Extension)');@(_DebuggerFiles)"
|
||||
Outputs="@(_Files->'$(UnityBuildDir)$(UnityDebuggerDataDir)%(RecursiveDir)%(Filename)%(Extension)');@(_DebuggerFiles->'$(UnityBuildDir)$(UnityDebuggerDir)%(RecursiveDir)%(Filename)%(Extension)')">
|
||||
|
||||
<Copy
|
||||
SourceFiles="@(_Files)"
|
||||
DestinationFiles="@(_Files->'$(UnityBuildDir)$(UnityDebuggerDataDir)%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
SkipUnchangedFiles="true" />
|
||||
|
||||
<Copy
|
||||
SourceFiles="@(_DebuggerFiles)"
|
||||
DestinationFiles="@(_DebuggerFiles->'$(UnityBuildDir)$(UnityDebuggerDir)%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
SkipUnchangedFiles="true" />
|
||||
|
||||
<Target Name="_CopyDebuggerBuild" DependsOnTargets="_ResolveOutputFiles;_ResolveOutputDebugger" Inputs="@(_Files->'$(_ProjectAbsPath)Project\Assets\bin\%(RecursiveDir)%(Filename)%(Extension)');@(_DebuggerFiles)" Outputs="@(_Files->'$(UnityBuildDir)$(UnityDebuggerDataDir)%(RecursiveDir)%(Filename)%(Extension)');@(_DebuggerFiles->'$(UnityBuildDir)$(UnityDebuggerDir)%(RecursiveDir)%(Filename)%(Extension)')">
|
||||
<Copy SourceFiles="@(_Files)" DestinationFiles="@(_Files->'$(UnityBuildDir)$(UnityDebuggerDataDir)%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
|
||||
<Copy SourceFiles="@(_DebuggerFiles)" DestinationFiles="@(_DebuggerFiles->'$(UnityBuildDir)$(UnityDebuggerDir)%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
|
||||
<!--Touch Files="@(_DebuggerFiles->'$(UnityBuildDir)$(UnityDebuggerDir)%(RecursiveDir)%(Filename)%(Extension)')" /-->
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="Deploy" DependsOnTargets="Build" />
|
||||
<Target Name="DeployDebugger" DependsOnTargets="_CopyDebuggerBuild;_CopyDependenciesToDebuggerDir" />
|
||||
<Target Name="BuildDebugger" DependsOnTargets="_BuildDebuggerProject;DeployDebugger" />
|
||||
|
||||
</Project>
|
|
@ -1,4 +1,4 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CodeEditor.Debugger.Unity.Standalone
|
||||
{
|
||||
|
@ -19,6 +19,11 @@ namespace CodeEditor.Debugger.Unity.Standalone
|
|||
Main.OnGUI();
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
Main.FixedUpdate();
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
Main.OnApplicationQuit();
|
||||
|
|
|
@ -44,8 +44,13 @@
|
|||
<Compile Include="MainWindow.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ServiceClient.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\..\..\Projects\CSharp\UnityEditor.csproj">
|
||||
<Project>{016C8D73-3641-47FB-8D33-7A015A7EC7DB}</Project>
|
||||
<Name>UnityEditor</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\..\..\Projects\CSharp\UnityEngine.csproj">
|
||||
<Project>{F0499708-3EB6-4026-8362-97E6FFC4E7C8}</Project>
|
||||
<Name>UnityEngine</Name>
|
||||
|
|
|
@ -6,7 +6,7 @@ using UnityEngine;
|
|||
namespace CodeEditor.Debugger.Unity.Standalone
|
||||
{
|
||||
[Export(typeof(IDebuggerWindow))]
|
||||
internal class ExecutionFlowControlWindow : IDebuggerWindow
|
||||
internal class ExecutionFlowControlWindow : DebuggerWindow
|
||||
{
|
||||
private readonly IDebuggerSession _debuggingSession;
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace CodeEditor.Debugger.Unity.Standalone
|
|||
_debuggingSession = debuggingSession;
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
public override void OnGUI()
|
||||
{
|
||||
GUI.enabled = _debuggingSession.Suspended;// && !_debuggingSession.WaitingForResponse;
|
||||
if (GUILayout.Button("Continue"))
|
||||
|
@ -43,4 +43,4 @@ namespace CodeEditor.Debugger.Unity.Standalone
|
|||
get { return "Controls"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using CodeEditor.Composition.Hosting;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CodeEditor.Debugger.Unity.Standalone
|
||||
{
|
||||
|
@ -9,6 +11,7 @@ namespace CodeEditor.Debugger.Unity.Standalone
|
|||
|
||||
public static void Start()
|
||||
{
|
||||
Console.WriteLine("Start: " + AssemblyPath);
|
||||
var compositionContainer = new CompositionContainer(new DirectoryCatalog(AssemblyPath));
|
||||
compositionContainer.GetExportedValue<IDebuggerSessionAssembler>().Assemble();
|
||||
view = compositionContainer.GetExportedValue<MainWindow>();
|
||||
|
@ -32,5 +35,10 @@ namespace CodeEditor.Debugger.Unity.Standalone
|
|||
public static void Update()
|
||||
{
|
||||
}
|
||||
|
||||
public static void FixedUpdate()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,57 +3,69 @@ using System.Diagnostics;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using CodeEditor.Composition;
|
||||
using CodeEditor.Debugger.Implementation;
|
||||
using CodeEditor.Debugger.Unity.Engine;
|
||||
using CodeEditor.Remoting;
|
||||
using UnityEngine;
|
||||
using Debug = UnityEngine.Debug;
|
||||
using Event = Mono.Debugger.Soft.Event;
|
||||
using EventType = UnityEngine.EventType;
|
||||
|
||||
namespace CodeEditor.Debugger.Unity.Standalone
|
||||
{
|
||||
[Export]
|
||||
class MainWindow
|
||||
public class MainWindow
|
||||
{
|
||||
private readonly SourceWindow _sourceWindow;
|
||||
private readonly LogWindow _log;
|
||||
private readonly SourcesWindow _sourcesWindow;
|
||||
|
||||
private readonly IDebuggerSession _debuggingSession;
|
||||
private readonly DebuggerWindowManager _windowManager;
|
||||
private readonly ISourceNavigator _sourceNavigator;
|
||||
|
||||
private readonly int _debugeeProcessID;
|
||||
|
||||
[ImportingConstructor]
|
||||
public MainWindow(SourceWindow sourceWindow, LogWindow log, DebuggerWindowManager windowManager, ISourceNavigator sourceNavigator, IDebuggerSession debuggingSession)
|
||||
{
|
||||
public MainWindow(SourceWindow sourceWindow, LogWindow log, DebuggerWindowManager windowManager,
|
||||
ISourceNavigator sourceNavigator, IDebuggerSession debuggingSession,
|
||||
ISourcesProvider provider) {
|
||||
|
||||
_sourceWindow = sourceWindow;
|
||||
_log = log;
|
||||
_windowManager = windowManager;
|
||||
_sourceNavigator = sourceNavigator;
|
||||
_debuggingSession = debuggingSession;
|
||||
_sourcesWindow = windowManager.Get<SourcesWindow>();
|
||||
|
||||
Camera.main.backgroundColor = new Color(0.125f,0.125f,0.125f,0);
|
||||
Camera.main.backgroundColor = new Color(0.125f, 0.125f, 0.125f, 0);
|
||||
Application.runInBackground = true;
|
||||
|
||||
_debuggingSession.TraceCallback += s => Trace(s);
|
||||
// _debuggingSession.Start(DebuggerPortFromCommandLine());
|
||||
_debuggingSession.VMGotSuspended += OnVMGotSuspended;
|
||||
|
||||
// _debugeeProcessID = DebugeeProcessIDFromCommandLine();
|
||||
|
||||
SetupDebuggingWindows();
|
||||
|
||||
AdjustLayout();
|
||||
|
||||
if (!HasArguments())
|
||||
return;
|
||||
|
||||
_debuggingSession.TraceCallback += s => Trace(s);
|
||||
_debuggingSession.VMGotSuspended += OnVMGotSuspended;
|
||||
// _debuggingSession.Start(DebuggerPortFromCommandLine());
|
||||
|
||||
_debugeeProcessID = DebugeeProcessIDFromCommandLine();
|
||||
|
||||
var client = provider as Client;
|
||||
if (client != null)
|
||||
client.Port = ServicePortFromCommandLine();
|
||||
|
||||
provider.StartRefreshingSources(null, null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void SetupDebuggingWindows()
|
||||
{
|
||||
/*
|
||||
_windowManager.Add(new ExecutionFlowControlWindow(_debuggingSession));
|
||||
_windowManager.Add(new CallStackDisplay(_debuggingSession, _sourceNavigator));
|
||||
_windowManager.Add(new ThreadsDisplay(_debuggingSession, new DebugThreadProvider(_debuggingSession)));
|
||||
|
||||
_windowManager.Add(_log);*/
|
||||
// _windowManager.Add(new ExecutionFlowControlWindow(_debuggingSession));
|
||||
// _windowManager.Add(new CallStackDisplay(_debuggingSession, _sourceNavigator));
|
||||
// _windowManager.Add(new ThreadsDisplay(_debuggingSession, new DebugThreadProvider(_debuggingSession)));
|
||||
}
|
||||
|
||||
|
||||
|
@ -63,7 +75,7 @@ namespace CodeEditor.Debugger.Unity.Standalone
|
|||
if (!stackFrames.Any()) return;
|
||||
|
||||
var topFrame = stackFrames[0];
|
||||
_sourceNavigator.ShowSourceLocation(topFrame.Location);
|
||||
_sourceNavigator.ShowSourceLocation(Location.FromLocation(topFrame.Location));
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
|
@ -75,7 +87,10 @@ namespace CodeEditor.Debugger.Unity.Standalone
|
|||
_debuggingSession.Update();
|
||||
|
||||
_windowManager.OnGUI();
|
||||
_sourceWindow.OnGUI();
|
||||
}
|
||||
|
||||
public void FixedUpdate()
|
||||
{
|
||||
}
|
||||
|
||||
private bool DebugeeProcessAlive()
|
||||
|
@ -94,23 +109,37 @@ namespace CodeEditor.Debugger.Unity.Standalone
|
|||
|
||||
private void AdjustLayout()
|
||||
{
|
||||
var srcViewPort = new Rect(0, 0, Screen.width, Screen.height * .7f);
|
||||
_sourceWindow.ViewPort = srcViewPort;
|
||||
var srcsViewPort = new Rect (0, 0, Screen.width * .2f, Screen.height * .7f);
|
||||
_sourcesWindow.ViewPort = srcsViewPort;
|
||||
|
||||
var srcViewPort = new Rect (Screen.width * .2f, 0, Screen.width - (Screen.width * .2f), Screen.height * .7f);
|
||||
_sourceWindow.ViewPort = srcViewPort;
|
||||
|
||||
var consoleTop = srcViewPort.yMax + VerticalSpacing;
|
||||
_windowManager.ViewPort = new Rect(0, consoleTop, Screen.width, Screen.height - consoleTop);
|
||||
|
||||
_windowManager.ResetWindows();
|
||||
}
|
||||
|
||||
const int VerticalSpacing = 4;
|
||||
|
||||
private int DebuggerPortFromCommandLine()
|
||||
bool HasArguments() {
|
||||
return Environment.GetCommandLineArgs().Count() > 2;
|
||||
}
|
||||
|
||||
private int SdbPortFromCommandLine ()
|
||||
{
|
||||
return ReadIntFromCommandLine(1);
|
||||
return ReadIntFromCommandLine (1);
|
||||
}
|
||||
|
||||
private int ServicePortFromCommandLine ()
|
||||
{
|
||||
return ReadIntFromCommandLine(2);
|
||||
}
|
||||
|
||||
private int DebugeeProcessIDFromCommandLine()
|
||||
{
|
||||
return ReadIntFromCommandLine(2);
|
||||
return ReadIntFromCommandLine(3);
|
||||
}
|
||||
|
||||
private static int ReadIntFromCommandLine(int index)
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CodeEditor.Composition;
|
||||
using CodeEditor.Remoting;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CodeEditor.Debugger.Unity.Standalone
|
||||
{
|
||||
// keep this in sync with the server
|
||||
enum ServiceRequestType : ushort
|
||||
{
|
||||
Unknown = 0,
|
||||
Sources = 1
|
||||
}
|
||||
|
||||
[Export (typeof (ISourcesProvider))]
|
||||
class ServiceClient : Client, ISourcesProvider
|
||||
{
|
||||
private bool _refreshing = false;
|
||||
private bool _started = false;
|
||||
private List<string> _sources = new List<string>();
|
||||
public IList<string> Sources
|
||||
{
|
||||
get { return _sources; }
|
||||
}
|
||||
|
||||
public ServiceClient()
|
||||
{
|
||||
Port = 12346;
|
||||
}
|
||||
|
||||
public override void Start ()
|
||||
{
|
||||
if (!_started)
|
||||
{
|
||||
_started = true;
|
||||
base.Start();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Stop ()
|
||||
{
|
||||
if (_started)
|
||||
{
|
||||
_started = false;
|
||||
base.Stop ();
|
||||
}
|
||||
}
|
||||
|
||||
public void StartRefreshingSources(EventHandler callback, object state)
|
||||
{
|
||||
Start();
|
||||
_refreshing = true;
|
||||
RefreshSources(callback, state);
|
||||
}
|
||||
|
||||
public void StopRefreshingSources()
|
||||
{
|
||||
_refreshing = false;
|
||||
Stop ();
|
||||
}
|
||||
|
||||
void RefreshSources (EventHandler callback, object state)
|
||||
{
|
||||
var req = RequestData.Create(RequestType.Service, (ushort)ServiceRequestType.Sources, null);
|
||||
SendRequestAsync (req, ar => OnRefreshSources (ar, callback), state);
|
||||
BeginReceive ();
|
||||
}
|
||||
|
||||
void OnRefreshSources (IAsyncResult ar, EventHandler callback)
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = ((AsyncRequestResult)ar).Response;
|
||||
|
||||
var sources = Serializer.Unpack<string[]>(response);
|
||||
_sources = new List<string>(sources);
|
||||
if (callback != null)
|
||||
callback(this, null);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex);
|
||||
}
|
||||
|
||||
if (_refreshing)
|
||||
RefreshSources (callback, ar.AsyncState);
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return "Service Client provider on port " + Port;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -69,10 +69,15 @@
|
|||
<Project>{6441A270-0DF3-42C9-9409-02BC273507DA}</Project>
|
||||
<Name>CodeEditor.Debugger</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Frameworks\CodeEditor.Remoting\CodeEditor.Remoting.csproj">
|
||||
<Project>{F3B4F98B-CC7D-4E3F-A8B6-FEA8E8C4A078}</Project>
|
||||
<Name>CodeEditor.Remoting</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="TypeProviderTests.cs" />
|
||||
<Compile Include="SourceToTypeMapperTests.cs" />
|
||||
<Compile Include="UnityServiceTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Moq">
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using NUnit.Framework;
|
||||
using CodeEditor.Remoting;
|
||||
|
||||
namespace CodeEditor.Debugger.Tests
|
||||
{
|
||||
class DebuggerServiceClient : Client
|
||||
{
|
||||
public DebuggerServiceClient()
|
||||
{
|
||||
Port = 12346;
|
||||
}
|
||||
|
||||
public string SendRequest(string message)
|
||||
{
|
||||
var req = Serializer.PackRequest(RequestType.Service, 1, message);
|
||||
var response = SendRequest(req);
|
||||
return Serializer.Unpack<string>(response);
|
||||
}
|
||||
}
|
||||
|
||||
[TestFixture]
|
||||
class UnityServiceTests
|
||||
{
|
||||
private DebuggerServiceClient _client;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_client = new DebuggerServiceClient();
|
||||
_client.Start();
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void Teardown()
|
||||
{
|
||||
_client.Stop();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PingTest()
|
||||
{
|
||||
var response = _client.SendRequest("Ping");
|
||||
Assert.AreEqual("Assets/AScript.cs", response);
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче