извиняюсь за публикацию здесь, но я посмотрел по всему inte rnet и ничего не могу найти.
Я пытаюсь использовать расширение ". NET Core Test Explorer " для отладки моих модульных тестов в VSCode.
Я могу запустить тесты просто отлично, но я не могу отладить их - это вывод :
Test run for Gameboy.Tests.MMUTests.Memory_ValidateBytes_WithSuccess, expecting 1 test results file(s) in total
Executing dotnet build in /Users/kevin/Repos/NetCore GameBoy/Gameboy.Tests/
Executing dotnet test --no-build --logger "trx;LogFileName=/var/folders/6d/p11jk7052lx2m4_fj5vk6qwc0000gn/T/test-explorer-sw7Rdk/0.trx" --filter "FullyQualifiedName=Gameboy.Tests.MMUTests.Memory_ValidateBytes_WithSuccess" in /Users/kevin/Repos/NetCore GameBoy/Gameboy.Tests/
Process 4345 started
Waiting for debugger to attach
Waiting for debugger to attach
Waiting for debugger to attach
Waiting for debugger to attach
Waiting for debugger to attach
Waiting for debugger to attach
Waiting for debugger to attach
По сути, я думаю, что он никогда не позволяет отладчику подключаться. Даже если я присоединю вручную к вышеуказанному PID, используя эту задачу:
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
Это все еще не достигнет моей точки останова в моем тесте.
Любая помощь будет оценена.
Вот полный вывод задач. json и запуск. json
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/Gameboy.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/Gameboy.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/Gameboy.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/Gameboy.dll",
"args": [],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}