debugging: can load the symbol when I build a console application but not when my application is attached to a process

0

I want to debug a application which is attach to a process.

I already have a command to build the dll in a debug mode.

launch.json:

 {

    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",
            //"preLaunchTask": "build",
            "program": "${workspaceFolder}/src/N3P.Revit/bin/Debug/net472/N3P.Revit.dll",
            "args": [],
            "cwd": "${workspaceFolder}/src/N3P.Revit/bin/Debug/net472",
            "console": "internalConsole",
            "stopAtEntry": false
        },
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            //"processId": "29856"
            "processName": "Revit.exe"
        }
    ]
}

task.json:

{
    "version": "2.0.0",
    "tasks": [
        //{
            // "label": "build",
            // "command": "dotnet", //do nothing
            // "type": "process",
            // "problemMatcher": "$msCompile",
            // "args": [           //do nothing
            //     "--info"]
        //},
        {
            "label": "publish",
            "command": "dotnet",
            "type": "process",
            "args": [
                "publish",
                "${workspaceFolder}/src/N3P.Revit/N3P.Revit.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile"
        },
        {
            "label": "watch",
            "command": "dotnet",
            "type": "process",
            "args": [
                "watch",
                "run",
                "${workspaceFolder}/src/N3P.Revit/N3P.Revit.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile"
        }
        
    ]
}

project.deps.jsoon:

{
  "runtimeTarget": {
    "name": ".NETCoreApp,Version=v4.7.2",
    "signature": ""
  },
  "compilationOptions": {},
  "targets": {
    ".NETCoreApp,Version=v4.7.2": {
      "Revit_plug_in/1.0.0": {
        "runtime": {
          "N3P.Revit.dll": {}
        }
      }
    }
  },
  "libraries": {}
}

When I click on .NET Core launch (console):

Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\5.0.4\System.Private.CoreLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. Loaded 'C:\Users\user040\Project\neulandt.n3p.revit\src\N3P.Revit\bin\Debug\net472\N3P.Revit.dll'. Symbols loaded. The program '[24376] N3P.Revit.dll' has exited with code -532462766 (0xe0434352)

The symbols are loaded but as expected it can't be run because it's a dll.

When I click on .Net Core Attach:

No problems but the symbols are not loaded

.net
debugging
visual-studio-code

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0