VS Code 1.19.3调试.net核心2并始终满足“只能调试64位进程”的要求。 [英] VS Code 1.19.3 debugging .net core 2 and always meet "Only 64-bit processes can be debugged"

查看:142
本文介绍了VS Code 1.19.3调试.net核心2并始终满足“只能调试64位进程”的要求。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我同时安装了x86和我的笔记本电脑上的 .net core 2.0 的x64 SDK(Win 7 SP1 x64)。我不知道为什么使用vs代码(1.19.3& x64&官方 c#扩展)总是选择x86运行时自动构建控制台,并总是遇到错误和弹出消息: 只能调试64位进程。

I've installed both x86 & x64 sdk of .net core 2.0 on my laptop (win 7 sp1 x64). I don't know why the vs code (1.19.3 & x64 & official c# extension) always choose the x86 runtime auto to build my console and always meet error and popup message: "Only 64-bit processes can be debugged.".

然后我尝试了:


  1. 我阅读了使用VS Code进行.NET Core调试-仅64-位进程可以调试。似乎对我根本没有用,按照答案来更改json文件和csproj文件。

  1. I read the question of .NET Core debugging with VS Code - "Only 64-bit processes can be debugged". And seems not working for me at all followed the answer to change the json file and csproj file.

我已经通过运行尝试了简单的控制台项目 C:\Program Files\dotnet\dotnet新控制台。调试时出现错误消息。

I've tried simple console project by running "C:\Program Files\dotnet\dotnet" new console. The error message is there while debugging.

此外,我尝试通过修改文件 .vscode\来强制指向x64运行时进行构建。 \tasks.json

Also, I've tried force to point to x64 runtime to build by modifying the file .vscode\tasks.json:

{

"version": "2.0.0",
"tasks": [
    {
        "taskName": "build",
        "command": "dotnet", --> change to "C:\\Program Files\\dotnet\\dotnet.exe"
        "type": "process",
        "args": [
            "build",
            "${workspaceFolder}/VSDebugCoreTest.csproj"
        ],
        "problemMatcher": "$msCompile"
    }
]

}

错误消息仍然存在只能调试64位进程。

The error message is still there "Only 64-bit processes can be debugged.".

我有x64 vscode,我有x64 sdk&运行时,我创建了&使用x64版本的sdk进行编译,并从内部终端显示编译成功。

I've x64 vscode, I've x64 sdk & runtime, I've create & compile with x64 version of sdk, and from the internal terminal show me the compiled succeeded.

任何人都知道为什么以及如何绕过此错误并能够调试吗? (请不要告诉我安装VS,对我来说这是个很大的机会。)

Anyone know why and how to bypass this error and able to debugging? (please do NOT tell me to install VS, it's huge for me.)

推荐答案

我尝试过类似的问题调试VSCode中的azure函数。问题出在通过Chocolatey安装的 azure-functions-core-tools 中。当前它正在安装x86版本的工具。解决该问题的步骤:

I faced similar issue trying to debug azure function in VSCode. The problem was in azure-functions-core-tools installed through chocolatey. Currently it is installing x86 version of tools. Steps I made to solve the problem:


  1. 运行 choco卸载azure-functions-core-tools

  2. 此处

  3. 编辑 tools\chocolateyinstall.ps1 脚本(将x86更改为URL中的x64)

  4. run choco install azure-functions-core-tools -source。 --ignore-checksums 在已编辑nupkg文件所在的文件夹中

  5. 在VSCode中调试功能很有趣

  1. run choco uninstall azure-functions-core-tools
  2. download nupkg file from here
  3. edit tools\chocolateyinstall.ps1 script (change x86 to x64 in a url)
  4. run choco install azure-functions-core-tools -source . --ignore-checksums in a folder where edited nupkg file is
  5. have fun debugging your functions in VSCode

这篇关于VS Code 1.19.3调试.net核心2并始终满足“只能调试64位进程”的要求。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆