Dmitry
Dmitry

Reputation: 201

Is it possible to produce *.pdb with dnu

I'm trying to debug C# project with VS Code. I like build system with "project.json" file and "dnu" utility. But "dnu build" produce only *.dll files and no *.pdb files. As result I see "Source code not available" in VS during debug session.

Is there any way to produce "*.pdb" or equivalent file with "dnu build"?

I'm using dnx with mono on Ubuntu and my project.json looks like following:

{
"configurations": {
    "Debug": {
        "compilationOptions": {
            "define": ["DEBUG", "TRACE"]
        }
    },
    "Release": {
        "compilationOptions": {
            "define": ["RELEASE", "TRACE"],
            "optimize": true
        }
    }
},
"frameworks": {
    "dnx451": {
        "frameworkAssemblies": {
            "System": "",
            "System.Runtime": ""
        }
    }
},
"dependencies": {
    "Newtonsoft.Json": "8.0",
    "Unity": "4.0"
},
"compile": "*/**/*.cs"
}

P.S. Any other ideas about how to debug assemblies produced by "dnu build" with VS Code are welcome.

Upvotes: 1

Views: 263

Answers (1)

Stafford Williams
Stafford Williams

Reputation: 9806

Looks like *.pdb are created on dnu build automatically on windows. I tried on Ubuntu and no *.pdb was created as you've seen.

However, I saw this, and confirmed that setting DNX_BUILD_PORTABLE_PDB to true;

export DNX_BUILD_PORTABLE_PDB=true

and then running dnu build results in the *.pdb being generated.

Upvotes: 1

Related Questions