我正在学习Azure数据湖分析和U-SQL。我有一个简单的脚本运行并产生预期的输出。但是,当我在helper方法后面的代码中设置断点时,它永远不会被命中,因为没有加载任何符号。我查看了所有可用的Microsoft教程,没有人建议我必须做任何事情来启用调试,它应该在我运行时正常工作。
U形SQL
@searchlog =
EXTRACT UserId int,
Start DateTime,
Region string,
Query string,
Duration int,
Urls string,
ClickedUrls string
FROM "/SearchLog.tsv"
USING Extractors.Tsv();
@searchlog = SELECT
UserId,
DataLake.Helper.Test() AS Test,
Start,
Region,
Query,
Duration,
Urls,
ClickedUrls
FROM @searchlog;
OUTPUT @searchlog
TO "/SearchLog_output.tsv"
USING Outputters.Tsv();
背后的代码
namespace DataLake
{
public class Helper
{
public static string Test()
{
Console.WriteLine("Stop");
return "Test";
}
}
}
输出窗口
'DebugHost.exe' (CLR v4.0.30319: DefaultDomain): Loaded.
'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561
934e089\mscorlib.dll'. Symbols loaded.
'DebugHost.exe' (CLR v4.0.30319: DefaultDomain): Loaded
'C:\Users\ksmith\Documents\Visual Studio
2017\Projects\USQLApplication1\DataLake\bin\LocalDebug\DebugHost.exe'.
Symbols loaded.
'DebugHost.exe' (CLR v4.0.30319: DebugHost.exe): Loaded
'C:\Users\ksmith\Documents\Visual Studio
2017\Projects\USQLApplication1\DataLake\bin\LocalDebug\Microsoft.Cosmos
.ScopeStudio.BusinessObjects.Debugger.dll'. Cannot find or open the PDB
file.
'DebugHost.exe' (CLR v4.0.30319: DebugHost.exe): Loaded
'C:\Users\ksmith\Documents\Visual Studio
2017\Projects\USQLApplication1\DataLake\bin\LocalDebug\Microsoft.Cosmos
.ScopeStudio.BusinessObjects.Common.dll'. Cannot find or open the PDB file.
'DebugHost.exe' (CLR v4.0.30319: DebugHost.exe): Loaded
'C:\Users\ksmith\Documents\Visual Studio
2017\Projects\USQLApplication1\DataLake\bin\LocalDebug\Microsoft.Analytics
.LocalRun.dll'. Cannot find or open the PDB file.
'DebugHost.exe' (CLR v4.0.30319: DebugHost.exe): Loaded
'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c56
1934e089\System.dll'. Symbols loaded.
'DebugHost.exe' (CLR v4.0.30319: DebugHost.exe): Loaded
'C:\Users\ksmith\Documents\Visual Studio
2017\Projects\USQLApplication1\DataLake\bin\LocalDebug\Microsoft.Cosmos.
ClientTools.Shared.dll'. Cannot find or open the PDB file.
'DebugHost.exe' (CLR v4.0.30319: DebugHost.exe): Loaded
'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__
b77a5c561934e089\System.Core.dll'. Symbols loaded.
'DebugHost.exe' (CLR v4.0.30319: DebugHost.exe): Loaded
'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b
77a5c561934e089\System.Xml.dll'. Symbols loaded.
'DebugHost.exe' (CLR v4.0.30319: DebugHost.exe): Loaded
'C:\Users\ksmith\Documents\Visual Studio
2017\Projects\USQLApplication1\DataLake\bin\LocalDebug\ScopeRuntime.exe'.
Cannot find or open the PDB file.
The program '[28036] DebugHost.exe' has exited with code 0 (0x0).
任何人都可以解释为什么断点没有被击中?
添加Debugger.Launch();导致出现Choose Just-In-Time Debugger窗口。如果我选择其中一个选项,那么获得一个visual studio的实例是破解点背后的代码被击中。 VS实例称为LocalVertexHost
由于
答案 0 :(得分:0)
DataLake Analytics的扩展对Visual Studio来说是一个问题。我已经并且仍然有这个问题。请按照以下步骤操作,可以正常运行,然后再次重复:
如果尚未找到断点,请尝试从本地U-SQL临时文件夹中删除所有内容,然后再次重复所有步骤。
答案 1 :(得分:0)
在我的环境中,当我单击Visual Studio中的“提交”按钮而不是按F5或单击“开始”(带有调试)时,就会发生这种情况。我想即使您提到已经使用f5运行我也应该分享,因为这是我可以找到的唯一提及此问题的地方。也许这对其他人会有帮助。
我认为单击提交会在没有附加调试器的情况下在单独的进程中运行usql脚本。
答案 2 :(得分:-1)
转到Visual Studio中的“调试”选项并确保以下内容: