Debug Azure Data Lake Analytics code locally

Important

Azure Data Lake Analytics retired on 29 February 2024. Learn more with this announcement.

For data analytics, your organization can use Azure Synapse Analytics or Microsoft Fabric.

You can use Azure Data Lake Tools for Visual Studio to run and debug Azure Data Lake Analytics code on your local workstation, just as you can in the Azure Data Lake Analytics service.

Learn how to run U-SQL script on your local machine.

Debug scripts and C# assemblies locally

You can debug C# assemblies without submitting and registering them to the Azure Data Lake Analytics service. You can set breakpoints in both the code-behind file and in a referenced C# project.

Debug local code in a code-behind file

  1. Set breakpoints in the code-behind file.
  2. Select F5 to debug the script locally.

Note

The following procedure works only in Visual Studio 2015. In older Visual Studio versions, you might need to manually add the PDB files.

Debug local code in a referenced C# project

  1. Create a C# assembly project, and build it to generate the output DLL file.

  2. Register the DLL file by using a U-SQL statement:

    CREATE ASSEMBLY assemblyname FROM @"..\..\path\to\output\.dll";
    
  3. Set breakpoints in the C# code.

  4. Select F5 to debug the script by referencing the C# DLL file locally.

Next steps